Added syntax highlighting for .CON files
This commit is contained in:
1
init.lua
1
init.lua
@@ -1,4 +1,5 @@
|
|||||||
-- load configurations files from lua/*
|
-- load configurations files from lua/*
|
||||||
|
require('filetype')
|
||||||
require('options')
|
require('options')
|
||||||
require('functions')
|
require('functions')
|
||||||
require('plugins')
|
require('plugins')
|
||||||
|
|||||||
5
lua/filetype.lua
Normal file
5
lua/filetype.lua
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
vim.filetype.add({
|
||||||
|
extension = {
|
||||||
|
CON = 'confile',
|
||||||
|
},
|
||||||
|
})
|
||||||
18
syntax/confile.vim
Normal file
18
syntax/confile.vim
Normal file
@@ -0,0 +1,18 @@
|
|||||||
|
" Vim Syntax file for CON files
|
||||||
|
|
||||||
|
syn match SetLength /^\d\{3\}/ nextgroup=SetKeyword,SetKeywordMarked
|
||||||
|
syn match SetKeyword /\d\{4\}/ contained
|
||||||
|
syn match SetKeywordMarked /310[123]\|5000/ contained nextgroup=SetKeywordMarkedInfo
|
||||||
|
syn match SetKeywordMarkedInfo /..*/ contained
|
||||||
|
|
||||||
|
hi SetLength guifg=grey
|
||||||
|
hi SetKeyword guifg=lightgreen
|
||||||
|
hi SetKeywordMarked gui=inverse guifg=lightgreen
|
||||||
|
hi SetKeywordMarkedInfo gui=inverse
|
||||||
|
|
||||||
|
|
||||||
|
syn match SetStart /^0138000/ nextgroup=SetType
|
||||||
|
syn match SetType /con0\|con9\|besa\|adt0\|adt9\|010[1-4]\|rvsa/ contained " 0101
|
||||||
|
|
||||||
|
hi SetStart guifg=white guibg=green
|
||||||
|
hi SetType guifg=white guibg=red
|
||||||
Reference in New Issue
Block a user