CMake Font Lock provides advanced highlight rules for CMakeMode, written by Anders Lindgren.
The main feature of this package is to highlight function arguments according how it’s used, as a keyword, a variable, etc. This is a replacement for the somewhat rudimentary font-lock support provided by CMakeMode.
if
, while
, function
, and include
are colored as font-lock keywords (not to be confused with keywords in the CMake sense).true
, false
, yes
, no
, y
, n
, on
, and off
are colored as constants.${...}
constructs are fontified as variables. Nested constructs are supported.$ENV{...}
, ENV
is fontified as a variable and the content as a constant.$<name:...>
constructs, name is colored as a constant.-DNAME
, NAME
is colored as a constant.The CMake Font Lock package is located on Github.