Browse Source

vim-cmake-syntax 2018-10-10 (ac1957fb)

Code extracted from:

    https://github.com/pboettch/vim-cmake-syntax.git

at commit ac1957fbccd24abc91089517f9116272825f8340 (master).

Upstream Shortlog
-----------------

Pablo Hernandez-Cerdan (1):
      baf680ae Add syntax for new cmake variables

Patrick Boettcher (5):
      2c9d5fda handle bracket-comments and arguments correctly
      37d3bcb0 add test for bracket-comments and arguments
      99b4a3d9 promote package_config_file-st to .in-file and add test
      3ed26c29 update to cmake version 3.13.20181010-ga3598
      ac1957fb update README
vim-cmake-syntax upstream 7 years ago
parent
commit
456d96f0d5
2 changed files with 38 additions and 9 deletions
  1. 31 4
      cmake.vim.in
  2. 7 5
      syntax/cmake.vim

+ 31 - 4
cmake.vim.in

@@ -19,8 +19,10 @@ endif
 let s:keepcpo= &cpo
 let s:keepcpo= &cpo
 set cpo&vim
 set cpo&vim
 
 
-syn region cmakeComment start="#" end="$" contains=cmakeTodo,cmakeLuaComment,@Spell
-syn region cmakeLuaComment start="\[\z(=*\)\[" end="\]\z1\]" contains=cmakeTodo,@Spell
+syn region cmakeBracketArgument start="\[\z(=\?\|=[0-9]*\)\[" end="\]\z1\]" contains=cmakeTodo,@Spell
+
+syn region cmakeComment start="#" end="$" contains=cmakeTodo,@Spell
+syn region cmakeBracketComment start="#\[\z(=\?\|=[0-9]*\)\[" end="\]\z1\]" contains=cmakeTodo,@Spell
 
 
 syn match cmakeEscaped /\(\\\\\|\\"\|\\n\|\\t\)/ contained
 syn match cmakeEscaped /\(\\\\\|\\"\|\\n\|\\t\)/ contained
 syn region cmakeRegistry start="\[" end="]" contained oneline contains=cmakeTodo,cmakeEscaped
 syn region cmakeRegistry start="\[" end="]" contained oneline contains=cmakeTodo,cmakeEscaped
@@ -33,7 +35,7 @@ syn region cmakeVariableValue start="${" end="}" contained oneline contains=cmak
 
 
 syn region cmakeEnvironment start="$ENV{" end="}" contained oneline contains=cmakeTodo
 syn region cmakeEnvironment start="$ENV{" end="}" contained oneline contains=cmakeTodo
 
 
-syn region cmakeArguments start="(" end=")" contains=ALLBUT,cmakeCommand,cmakeCommandConditional,cmakeCommandRepeat,cmakeCommandDeprecated,cmakeArguments,cmakeTodo
+syn region cmakeArguments start="(" end=")" contains=ALLBUT,cmakeCommand,cmakeCommandConditional,cmakeCommandRepeat,cmakeCommandDeprecated,cmakeCommandManuallyAdded,cmakeArguments,cmakeTodo
 
 
 syn case match
 syn case match
 
 
@@ -75,6 +77,8 @@ syn keyword cmakeTodo
             \ TODO FIXME XXX
             \ TODO FIXME XXX
             \ contained
             \ contained
 
 
+hi def link cmakeBracketArgument String
+hi def link cmakeBracketComment Comment
 hi def link cmakeCommand Function
 hi def link cmakeCommand Function
 hi def link cmakeCommandConditional Conditional
 hi def link cmakeCommandConditional Conditional
 hi def link cmakeCommandDeprecated WarningMsg
 hi def link cmakeCommandDeprecated WarningMsg
@@ -84,7 +88,6 @@ hi def link cmakeEnvironment Special
 hi def link cmakeEscaped Special
 hi def link cmakeEscaped Special
 hi def link cmakeGeneratorExpression WarningMsg
 hi def link cmakeGeneratorExpression WarningMsg
 hi def link cmakeGeneratorExpressions Constant
 hi def link cmakeGeneratorExpressions Constant
-hi def link cmakeLuaComment Comment
 hi def link cmakeModule Include
 hi def link cmakeModule Include
 hi def link cmakeProperty Constant
 hi def link cmakeProperty Constant
 hi def link cmakeRegistry Underlined
 hi def link cmakeRegistry Underlined
@@ -95,6 +98,30 @@ hi def link cmakeVariable Identifier
 
 
 @KEYWORDS_HIGHLIGHT@
 @KEYWORDS_HIGHLIGHT@
 
 
+" Manually added - difficult to parse out of documentation
+syn case ignore
+
+syn keyword cmakeCommandManuallyAdded
+            \ configure_package_config_file write_basic_package_version_file
+            \ nextgroup=cmakeArguments
+
+syn case match
+
+syn keyword cmakeKWconfigure_package_config_file contained
+            \ INSTALL_DESTINATION PATH_VARS NO_SET_AND_CHECK_MACRO NO_CHECK_REQUIRED_COMPONENTS_MACRO INSTALL_PREFIX
+
+syn keyword cmakeKWconfigure_package_config_file_constants contained
+            \ AnyNewerVersion SameMajorVersion SameMinorVersion ExactVersion
+
+syn keyword cmakeKWwrite_basic_package_version_file contained
+            \ VERSION COMPATIBILITY
+
+hi def link cmakeCommandManuallyAdded Function
+
+hi def link cmakeKWconfigure_package_config_file ModeMsg
+hi def link cmakeKWwrite_basic_package_version_file ModeMsg
+hi def link cmakeKWconfigure_package_config_file_constants Constant
+
 let b:current_syntax = "cmake"
 let b:current_syntax = "cmake"
 
 
 let &cpo = s:keepcpo
 let &cpo = s:keepcpo

File diff suppressed because it is too large
+ 7 - 5
syntax/cmake.vim


Some files were not shown because too many files changed in this diff