Add cmakecache filetype for CMakeCache.txt files

This commit is contained in:
Kenneth Benzie 2019-10-04 20:30:04 +01:00
parent 0d0e69a2ec
commit 65d3e645b1
3 changed files with 19 additions and 0 deletions

1
ftdetect/cmakecache.vim Normal file
View File

@ -0,0 +1 @@
autocmd BufNewFile,BufReadPost CMakeCache.txt set filetype=cmakecache

1
ftplugin/cmakecache.vim Normal file
View File

@ -0,0 +1 @@
setlocal nospell

17
syntax/cmakecache.vim Normal file
View File

@ -0,0 +1,17 @@
if exists('b:current_syntax')
finish
endif
highlight default link cmakecacheComment Comment
highlight default link cmakecacheVariable Identifier
highlight default link cmakecacheType Type
highlight default link cmakecacheValue String
highlight default link cmakecacheDelimiter Delimiter
syntax region cmakecacheComment start='#' end='$'
syntax region cmakecacheComment start='//' end='$'
syntax region cmakecacheVariable matchgroup=cmakecacheDelimiter start='^\ze\w\+' end=':'
syntax keyword cmakecacheType
\ BOOL PATH FILEPATH STRING INTERNAL STATIC UNINITIALIZED
syntax region cmakecacheValue start='=\zs' end='$' contains=cmakecacheDelimiter
syntax match cmakecacheDelimiter ';' contained