aboutsummaryrefslogtreecommitdiffstats
path: root/queries/v
diff options
context:
space:
mode:
authorStephan Seitz <stephan.seitz@fau.de>2022-02-26 13:54:19 +0100
committerStephan Seitz <stephan.seitz@fau.de>2022-05-21 13:48:58 +0200
commit4da1d0702aa33ff5a8da6590bbb362e645c76a5f (patch)
tree9b7e81b9cbf1b222cb823bd3e3e3036102cc6fc2 /queries/v
parentfeat: highlight string_interpolation identifiers (diff)
downloadnvim-treesitter-4da1d0702aa33ff5a8da6590bbb362e645c76a5f.tar
nvim-treesitter-4da1d0702aa33ff5a8da6590bbb362e645c76a5f.tar.gz
nvim-treesitter-4da1d0702aa33ff5a8da6590bbb362e645c76a5f.tar.bz2
nvim-treesitter-4da1d0702aa33ff5a8da6590bbb362e645c76a5f.tar.lz
nvim-treesitter-4da1d0702aa33ff5a8da6590bbb362e645c76a5f.tar.xz
nvim-treesitter-4da1d0702aa33ff5a8da6590bbb362e645c76a5f.tar.zst
nvim-treesitter-4da1d0702aa33ff5a8da6590bbb362e645c76a5f.zip
highlights(vlang): add `attribute_declaration` and specialize some keywords
Diffstat (limited to 'queries/v')
-rw-r--r--queries/v/highlights.scm49
1 files changed, 31 insertions, 18 deletions
diff --git a/queries/v/highlights.scm b/queries/v/highlights.scm
index d31fe8ff9..c089fe045 100644
--- a/queries/v/highlights.scm
+++ b/queries/v/highlights.scm
@@ -33,6 +33,7 @@
((identifier) @variable.builtin
(#match? @variable.builtin "^(err|macos|linux|windows)$"))
+(attribute_declaration) @attribute
;; C: TODO: fixme make `C`.exten highlighted as variable.builtin
; ((binded_identifier) @content
; (#offset! @content 0 3 0 -1)
@@ -67,37 +68,50 @@
;; Keywords
[
+ "import"
+ "module"
+] @include
+
+[
+ "match"
+ "if"
+ "$if"
+ "else"
+ "$else"
+] @conditional
+
+[
+ "for" @repeat
+ "$for"
+] @repeat
+
+[
"as"
+ "in"
+ "!in"
+ "or"
+ "is"
+ "!is"
+] @keyword.operator
+
+[
"asm"
"assert"
"const"
"defer"
- "else"
- "$else"
"enum"
- "$for"
"go"
"goto"
- "if"
- "$if"
- "import"
- "in"
- "!in"
"interface"
- "is"
- "!is"
"lock"
- "match"
- "module"
"mut"
- "or"
"pub"
"rlock"
- "select"
"struct"
"type"
- "unsafe"]
- ;; Either not supported or will be droped
+ "unsafe"
+]
+ ;; Either not supported or will be dropped
;"atomic"
;"break"
; "continue"
@@ -108,11 +122,10 @@
"fn" @keyword.function
"return" @keyword.return
-"for" @repeat
; "import" @include ;; note: comment out b/c of import_path @namespace
-[ (true) (false)] @boolean
+[ (true) (false) ] @boolean