aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorUy Ha <hchanuy@gmail.com>2021-06-25 11:05:12 +0200
committerStephan Seitz <stephan.lauf@yahoo.de>2021-07-02 08:37:02 +0200
commit0a2828a04c2e732bf11fb521c368bd617ffecf99 (patch)
treeab7fa3f11ed462726899d7dbde508413d8cd41d0
parentHighlight only command name instead of the whole call (diff)
downloadnvim-treesitter-0a2828a04c2e732bf11fb521c368bd617ffecf99.tar
nvim-treesitter-0a2828a04c2e732bf11fb521c368bd617ffecf99.tar.gz
nvim-treesitter-0a2828a04c2e732bf11fb521c368bd617ffecf99.tar.bz2
nvim-treesitter-0a2828a04c2e732bf11fb521c368bd617ffecf99.tar.lz
nvim-treesitter-0a2828a04c2e732bf11fb521c368bd617ffecf99.tar.xz
nvim-treesitter-0a2828a04c2e732bf11fb521c368bd617ffecf99.tar.zst
nvim-treesitter-0a2828a04c2e732bf11fb521c368bd617ffecf99.zip
Move keywords to their appropriate capture:
- Unary and binary operator to `@keyword.operator` - Boolean constants to `@boolean`
-rw-r--r--queries/cmake/highlights.scm44
1 files changed, 25 insertions, 19 deletions
diff --git a/queries/cmake/highlights.scm b/queries/cmake/highlights.scm
index 1f2786e23..a8f8b43ba 100644
--- a/queries/cmake/highlights.scm
+++ b/queries/cmake/highlights.scm
@@ -47,9 +47,10 @@
"N"
"IGNORE"
"NOTFOUND"
- "NOT"
- "AND"
- "OR"
+] @boolean
+
+
+[
"COMMAND"
"POLICY"
"TARGET"
@@ -63,22 +64,6 @@
"IS_DIRECTORY"
"IS_SYMLINK"
"IS_ABSOLUTE"
- "MATCHES"
- "LESS"
- "GREATER"
- "EQUAL"
- "LESS_EQUAL"
- "GREATER_EQUAL"
- "STRLESS"
- "STRGREATER"
- "STREQUAL"
- "STRLESS_EQUAL"
- "STRGREATER_EQUAL"
- "VERSION_LESS"
- "VERSION_GREATER"
- "VERSION_EQUAL"
- "VERSION_LESS_EQUAL"
- "VERSION_GREATER_EQUAL"
"IN"
"RANGE"
"ZIP_LISTS"
@@ -99,3 +84,24 @@
"CHECK_FAIL"
] @keyword
+[
+ "NOT"
+ "AND"
+ "OR"
+ "MATCHES"
+ "LESS"
+ "GREATER"
+ "EQUAL"
+ "LESS_EQUAL"
+ "GREATER_EQUAL"
+ "STRLESS"
+ "STRGREATER"
+ "STREQUAL"
+ "STRLESS_EQUAL"
+ "STRGREATER_EQUAL"
+ "VERSION_LESS"
+ "VERSION_GREATER"
+ "VERSION_EQUAL"
+ "VERSION_LESS_EQUAL"
+ "VERSION_GREATER_EQUAL"
+] @keyword.operator