aboutsummaryrefslogtreecommitdiffstats
path: root/queries/cmake
diff options
context:
space:
mode:
authorUy Ha <hchanuy@gmail.com>2021-09-09 22:01:56 +0200
committerStephan Seitz <stephan.seitz@fau.de>2021-09-09 22:57:22 +0200
commit16f4833b57d49f1be534cb770e4a92a09eb63d00 (patch)
treec11c597dabc294ec364ffcf41c78e5fb96067c0a /queries/cmake
parent[docgen] Update README.md (diff)
downloadnvim-treesitter-16f4833b57d49f1be534cb770e4a92a09eb63d00.tar
nvim-treesitter-16f4833b57d49f1be534cb770e4a92a09eb63d00.tar.gz
nvim-treesitter-16f4833b57d49f1be534cb770e4a92a09eb63d00.tar.bz2
nvim-treesitter-16f4833b57d49f1be534cb770e4a92a09eb63d00.tar.lz
nvim-treesitter-16f4833b57d49f1be534cb770e4a92a09eb63d00.tar.xz
nvim-treesitter-16f4833b57d49f1be534cb770e4a92a09eb63d00.tar.zst
nvim-treesitter-16f4833b57d49f1be534cb770e4a92a09eb63d00.zip
[cmake]: Add highlighting for `set` command
Diffstat (limited to 'queries/cmake')
-rw-r--r--queries/cmake/highlights.scm14
1 files changed, 14 insertions, 0 deletions
diff --git a/queries/cmake/highlights.scm b/queries/cmake/highlights.scm
index 22da28732..9be78c1b0 100644
--- a/queries/cmake/highlights.scm
+++ b/queries/cmake/highlights.scm
@@ -50,3 +50,17 @@
(argument)* @parameter
)
+(normal_command
+ (identifier) @function.builtin
+ . (argument) @variable
+ (#match? @function.builtin "\\c^(set)$"))
+
+(normal_command
+ (identifier) @function.builtin
+ . (argument)
+ . (argument)
+ (argument) @constant
+ (#any-of? @constant "PARENT_SCOPE" "CACHE" "FORCE")
+ (#match? @function.builtin "\\c^(set)$")
+)
+