diff options
| author | Uy Ha <hchanuy@gmail.com> | 2023-02-27 15:26:11 +0000 |
|---|---|---|
| committer | Stephan Seitz <stephan.seitz@fau.de> | 2023-02-27 14:52:26 -0800 |
| commit | cf718048ca2a43701931ccba445cf17502641d53 (patch) | |
| tree | 9db5721715b11d01a1b5ada02beb11883c89c9c0 | |
| parent | Update parsers: c_sharp, fortran, swift (diff) | |
| download | nvim-treesitter-cf718048ca2a43701931ccba445cf17502641d53.tar nvim-treesitter-cf718048ca2a43701931ccba445cf17502641d53.tar.gz nvim-treesitter-cf718048ca2a43701931ccba445cf17502641d53.tar.bz2 nvim-treesitter-cf718048ca2a43701931ccba445cf17502641d53.tar.lz nvim-treesitter-cf718048ca2a43701931ccba445cf17502641d53.tar.xz nvim-treesitter-cf718048ca2a43701931ccba445cf17502641d53.tar.zst nvim-treesitter-cf718048ca2a43701931ccba445cf17502641d53.zip | |
simplify cmake highlight queries
| -rw-r--r-- | queries/cmake/highlights.scm | 138 |
1 files changed, 2 insertions, 136 deletions
diff --git a/queries/cmake/highlights.scm b/queries/cmake/highlights.scm index 0e846507d..b96323420 100644 --- a/queries/cmake/highlights.scm +++ b/queries/cmake/highlights.scm @@ -97,143 +97,9 @@ ) (normal_command - (identifier) @_function - (#match? @_function "\\c^set$") - ( - (argument) @constant - (#any-of? @constant "PARENT_SCOPE") - ) . -) - -(normal_command - (identifier) @_function - (#match? @_function "\\c^set$") - . (argument) - ( - (argument) @_cache @storageclass - . - (argument) @_type @type - (#any-of? @_cache "CACHE") - (#any-of? @_type "BOOL" "FILEPATH" "PATH" "STRING" "INTERNAL") - ) -) -(normal_command - (identifier) @_function - (#match? @_function "\\c^set$") - . (argument) - (argument) @_cache - (#any-of? @_cache "CACHE") - ( - (argument) @_force @constant - (#any-of? @_force "FORCE") - ) . -) - -(normal_command - (identifier) @_function - (#match? @_function "\\c^unset$") - . (argument) @variable -) -(normal_command - (identifier) @_function - (#match? @_function "\\c^unset$") - . (argument) - (argument) @storageclass - (#any-of? @storageclass "CACHE" "PARENT_SCOPE") -) - -(normal_command - (identifier) @_function - (#match? @_function "\\c^list$") - . (argument) @constant - (#any-of? @constant "LENGTH" "GET" "JOIN" "SUBLIST" "FIND") - . (argument) @variable - (argument) @variable . -) -(normal_command - (identifier) @_function - (#match? @_function "\\c^list$") - . (argument) @constant - . (argument) @variable - (#any-of? @constant "APPEND" "FILTER" "INSERT" - "POP_BACK" "POP_FRONT" "PREPEND" - "REMOVE_ITEM" "REMOVE_AT" "REMOVE_DUPLICATES" - "REVERSE" "SORT") -) -(normal_command - (identifier) @_function - (#match? @_function "\\c^list$") - . (argument) @_transform @constant - . (argument) @variable - . (argument) @_action @constant - (#match? @_transform "TRANSFORM") - (#any-of? @_action "APPEND" "PREPEND" "TOUPPER" "TOLOWER" "STRIP" "GENEX_STRIP" "REPLACE") -) -(normal_command - (identifier) @_function - (#match? @_function "\\c^list$") - . (argument) @_transform @constant - . (argument) @variable - . (argument) @_action @constant - . (argument)? @_selector @constant - (#match? @_transform "TRANSFORM") - (#any-of? @_action "APPEND" "PREPEND" "TOUPPER" "TOLOWER" "STRIP" "GENEX_STRIP" "REPLACE") - (#any-of? @_selector "AT" "FOR" "REGEX") -) -(normal_command - (identifier) @_function - (#match? @_function "\\c^list$") - . (argument) @_transform @constant - (argument) @constant . - (argument) @variable - (#match? @_transform "TRANSFORM") - (#match? @constant "OUTPUT_VARIABLE") -) - -(normal_command - (identifier) @_function - (#match? @_function "\\c^add_custom_target$") - . (argument) - (argument) @constant - (#any-of? @constant "ALL" "COMMAND" "DEPENDS" "BYPRODUCTS" "WORKING_DIRECTORY" "COMMENT" - "JOB_POOL" "VERBATIM" "USES_TERMINAL" "COMMAND_EXPAND_LISTS" "SOURCES") -) - -(normal_command - (identifier) @_function - (#match? @_function "\\c^add_custom_command$") - (argument) @constant - (#any-of? @constant "OUTPUT" "COMMAND" "MAIN_DEPENDENCY" "DEPENDS" "BYPRODUCTS" "IMPLICIT_DEPENDS" "WORKING_DIRECTORY" - "COMMENT" "DEPFILE" "JOB_POOL" "VERBATIM" "APPEND" "USES_TERMINAL" "COMMAND_EXPAND_LISTS") -) - -(normal_command - (identifier) @_function - (#match? @_function "\\c^include$") - (argument) @constant - (#any-of? @constant "OPTIONAL" "NO_POLICY_SCOPE") -) -(normal_command - (identifier) @_function - (#match? @_function "\\c^include$") - (argument) @constant - . - (argument) @variable - (#match? @constant "RESULT_VARIABLE") -) - -(normal_command - (identifier) @_function - (#match? @_function "\\c^project$") - (argument) @constant - (#any-of? @constant "VERSION" "DESCRIPTION" "HOMEPAGE_URL" "LANGUAGES") -) - -(normal_command - (identifier) @_function - (#match? @_function "\\c^cmake_minimum_required$") + (identifier) (argument) @constant - (#any-of? @constant "VERSION" "FATAL_ERROR") + (#match? @constant "^[A-Z][A-Z_]+$") ) (escape_sequence) @string.escape |
