From 4da1d0702aa33ff5a8da6590bbb362e645c76a5f Mon Sep 17 00:00:00 2001 From: Stephan Seitz Date: Sat, 26 Feb 2022 13:54:19 +0100 Subject: highlights(vlang): add `attribute_declaration` and specialize some keywords --- queries/v/highlights.scm | 49 ++++++++++++++++++++++++++++++------------------ 1 file 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) @@ -66,38 +67,51 @@ ;; 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 -- cgit v1.2.3-70-g09d2