aboutsummaryrefslogtreecommitdiffstats
path: root/queries/jsonnet
diff options
context:
space:
mode:
authorHoang Nguyen <folliekazetani@protonmail.com>2023-06-08 14:13:26 +0000
committerGitHub <noreply@github.com>2023-06-08 10:13:26 -0400
commit71bb1da621a48856c7f8ca10e674f2ac8c0a9005 (patch)
treefe57f3efa0c1af136e9108921b77cafb14cd9342 /queries/jsonnet
parentUpdate parsers: commonlisp, lua, ruby, scala (#4927) (diff)
downloadnvim-treesitter-71bb1da621a48856c7f8ca10e674f2ac8c0a9005.tar
nvim-treesitter-71bb1da621a48856c7f8ca10e674f2ac8c0a9005.tar.gz
nvim-treesitter-71bb1da621a48856c7f8ca10e674f2ac8c0a9005.tar.bz2
nvim-treesitter-71bb1da621a48856c7f8ca10e674f2ac8c0a9005.tar.lz
nvim-treesitter-71bb1da621a48856c7f8ca10e674f2ac8c0a9005.tar.xz
nvim-treesitter-71bb1da621a48856c7f8ca10e674f2ac8c0a9005.tar.zst
nvim-treesitter-71bb1da621a48856c7f8ca10e674f2ac8c0a9005.zip
feat(jsonnet): add "for" & "function", update operator highlights
`expr` -> `operator` doesn't exist in the node tree anymore after https://github.com/sourcegraph/tree-sitter-jsonnet/commit/505f5bd90053ae895aa3d6f2bac8071dd9abd8b2
Diffstat (limited to 'queries/jsonnet')
-rw-r--r--queries/jsonnet/highlights.scm24
1 files changed, 22 insertions, 2 deletions
diff --git a/queries/jsonnet/highlights.scm b/queries/jsonnet/highlights.scm
index eb8d22be9..4267c988f 100644
--- a/queries/jsonnet/highlights.scm
+++ b/queries/jsonnet/highlights.scm
@@ -30,13 +30,33 @@
":::"
] @punctuation.delimiter
-(expr
- operator: (_) @operator)
+(unaryop) @operator
[
"+"
+ "-"
+ "*"
+ "/"
+ "%"
+ "^"
+ "=="
+ "!="
+ "<="
+ ">="
+ "<"
+ ">"
"="
+ "&"
+ "|"
+ "<<"
+ ">>"
+ "&&"
+ "||"
] @operator
+"for" @repeat
+
+"function" @keyword.function
+
"in" @keyword.operator
[