nano/syntax/cmake.nanorc
Benno Schulenberg 0e1d45dc36 tweaks: fold some regexes together, and trim or improve some comments
Also, trim some whitespace and group one rule better.

Also, fix a stray closing parenthesis in the JSON syntax,
and add the missing slash to the possible escaped characters.
(Reference: https://www.json.org/json-en.html.)

Also, improve the ending of multiline strings in the Rust syntax.
2021-10-27 11:25:45 +02:00

23 lines
824 B
Plaintext

## Syntax highlighting for CMake files.
syntax cmake "(CMakeLists\.txt|\.cmake)$"
comment "#"
color green "^[[:blank:]]*[0-9A-Za-z_]+"
icolor brightyellow "^[[:blank:]]*(include|include_directories|include_external_msproject)\>"
icolor brightgreen "^[[:blank:]]*((else|end)?if|else|(end)?while|(end)?foreach|break)\>"
color brightgreen "\<(NOT|COMMAND|POLICY|TARGET|EXISTS|IS_(DIRECTORY|ABSOLUTE)|DEFINED)[[:blank:]]"
color brightgreen "[[:blank:]](OR|AND|IS_NEWER_THAN|MATCHES|(STR|VERSION_)?(LESS|GREATER|EQUAL))[[:blank:]]"
icolor brightred "^[[:blank:]]*((end)?(function|macro)|return)"
icolor cyan start="\$(ENV)?\{" end="\}"
color magenta "\<(APPLE|UNIX|WIN32|CYGWIN|BORLAND|MINGW|MSVC(_IDE|60|71|80|90)?)\>"
# Comments.
color brightblue "(^|[[:blank:]])#.*"
# Trailing whitespace.
color ,green "[[:space:]]+$"