aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorObserverOfTime <chronobserver@disroot.org>2022-11-20 14:57:09 +0200
committerObserverOfTime <chronobserver@disroot.org>2022-11-26 13:17:51 +0200
commitbedc763361d0eccbf89e410faa8633189107d366 (patch)
treefb15ed6011165bb55e1f52b9eae4946975a5206e
parenthighlights(julia): use more specific groups (diff)
downloadnvim-treesitter-bedc763361d0eccbf89e410faa8633189107d366.tar
nvim-treesitter-bedc763361d0eccbf89e410faa8633189107d366.tar.gz
nvim-treesitter-bedc763361d0eccbf89e410faa8633189107d366.tar.bz2
nvim-treesitter-bedc763361d0eccbf89e410faa8633189107d366.tar.lz
nvim-treesitter-bedc763361d0eccbf89e410faa8633189107d366.tar.xz
nvim-treesitter-bedc763361d0eccbf89e410faa8633189107d366.tar.zst
nvim-treesitter-bedc763361d0eccbf89e410faa8633189107d366.zip
highlights(meson): fix captures
Co-Authored-By: ShootingStarDragons <ShootingStarDragons@protonmail.com>
-rw-r--r--queries/meson/highlights.scm36
1 files changed, 15 insertions, 21 deletions
diff --git a/queries/meson/highlights.scm b/queries/meson/highlights.scm
index 7b7c75a9e..41af33063 100644
--- a/queries/meson/highlights.scm
+++ b/queries/meson/highlights.scm
@@ -1,7 +1,9 @@
(comment) @comment
-(number) @number
+(number) @number
(bool) @boolean
+(identifier) @variable
+
[
"("
")"
@@ -9,8 +11,7 @@
"}"
"["
"]"
-]
-@punctuation.bracket
+] @punctuation.bracket
[
":"
@@ -38,6 +39,8 @@
">="
] @operator
+"?" @conditional.ternary
+
[
"if"
"elif"
@@ -52,30 +55,21 @@
(keyword_continue)
] @repeat
-;;; format
(string) @string
-["@"] @punctuation.special
-(experession_statement
- object: (identifier) @variable)
+"@" @punctuation.special
(normal_command
command: (identifier) @function)
-
-(list
- variable: (identifier) @variable)
-
-(operatorunit
- (identifier) @variable)
-
-(formatunit
- variable: (identifier) @variable)
-
-(variableunit
- value: (identifier) @variable)
(pair
key: (identifier) @property)
-(pair
- value: (identifier) @variable)
(escape_sequence) @string.escape
+
+((identifier) @variable.builtin
+ (#any-of? @variable.builtin
+ "meson"
+ "host_machine"
+ "build_machine"
+ "target_machine"
+ ))