diff --git a/misc/syntax/Makefile.am b/misc/syntax/Makefile.am index ce86221da..71d53e6ab 100644 --- a/misc/syntax/Makefile.am +++ b/misc/syntax/Makefile.am @@ -9,6 +9,7 @@ SYNTAXFILES = \ c.syntax \ cabal.syntax \ changelog.syntax \ + cmake.syntax \ cs.syntax \ css.syntax \ cxx.syntax \ diff --git a/misc/syntax/Syntax b/misc/syntax/Syntax index ef7de50dd..f64f2915f 100644 --- a/misc/syntax/Syntax +++ b/misc/syntax/Syntax @@ -67,6 +67,9 @@ include tt.syntax file (.\*[Mm]akefile[\\\.A-Za-z0-9]\*|..\*\\.mk|Kbuild)$ Makefile include makefile.syntax +file CMakeLists.txt$ CMake +include cmake.syntax + file ..\*\\.(pp|PP|pas|PAS|dpr|DPR|inc|INC)$ Pascal\sProgram include pascal.syntax diff --git a/misc/syntax/cmake.syntax b/misc/syntax/cmake.syntax new file mode 100644 index 000000000..c357aadf0 --- /dev/null +++ b/misc/syntax/cmake.syntax @@ -0,0 +1,57 @@ +# CMake syntax highlighting +# +# Author: Henrik Pauli + +wholechars abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ_ + +context default + keyword ( brightcyan + keyword ) brightcyan + + keyword ${\[^}\]+} brightgreen + + keyword whole IF magenta + keyword whole ELSE magenta + keyword whole ENDIF magenta + + keyword whole cmake_minimum_required yellow + keyword whole PROJECT yellow + keyword whole SET yellow + keyword whole INCLUDE yellow + keyword whole ADD_+ yellow + keyword whole SET_+ yellow + keyword whole TARGET_+ yellow + keyword whole FIND_+ yellow + keyword whole find_+ yellow + keyword whole file yellow + keyword whole file_+ yellow + keyword whole configure_+ yellow + keyword whole install yellow + + keyword whole MESSAGE brightmagenta + + keyword whole STATIC white + keyword whole SHARED white + + keyword whole MATCHES white + + keyword whole ON brightcyan + keyword whole OFF brightcyan + keyword whole NOT brightcyan + keyword whole DEFINED brightcyan + + keyword whole NAMES white + keyword whole FILES white + keyword whole DIRECTORY white + keyword whole TARGETS white + keyword whole LIBRARY white + keyword whole DESTINATION white + + spellcheck + +context # \n brown + +context " " green + keyword ${\[^}\]+} brightgreen + + spellcheck