aboutsummaryrefslogtreecommitdiffstats
path: root/queries
diff options
context:
space:
mode:
authorChristian Clason <c.clason@uni-graz.at>2023-12-24 10:00:20 +0100
committerChristian Clason <c.clason@uni-graz.at>2024-01-19 16:58:37 +0100
commit1ae9b0e4558fe7868f8cda2db65239cfb14836d0 (patch)
tree4eea14b40b8b81d9388fb35cbc9e35b341a75c98 /queries
parentchore(tests): consistent captures (diff)
downloadnvim-treesitter-1ae9b0e4558fe7868f8cda2db65239cfb14836d0.tar
nvim-treesitter-1ae9b0e4558fe7868f8cda2db65239cfb14836d0.tar.gz
nvim-treesitter-1ae9b0e4558fe7868f8cda2db65239cfb14836d0.tar.bz2
nvim-treesitter-1ae9b0e4558fe7868f8cda2db65239cfb14836d0.tar.lz
nvim-treesitter-1ae9b0e4558fe7868f8cda2db65239cfb14836d0.tar.xz
nvim-treesitter-1ae9b0e4558fe7868f8cda2db65239cfb14836d0.tar.zst
nvim-treesitter-1ae9b0e4558fe7868f8cda2db65239cfb14836d0.zip
feat!: align standard captures with upstream
Problem: Sharing highlight queries with upstream tree-sitter and Helix is difficult. Solution: Where reasonable, use capture names in tree-sitter's standard list or Helix's Atom-style hierarchy. Specifically: * tree-sitter "standard capture names" (https://github.com/tree-sitter/tree-sitter/blob/3f44b896852eb7daaa6df4fb778c9bb52c70c815/highlight/src/lib.rs#L20-L72): - `@parameter` -> `@variable.parameter` - `@field` -> `@variable.member` - `@namespace` -> `@module` - `@float` -> `@number.float` - `@symbol` -> `@string.special.symbol` - `@string.regex` -> `@string.regexp` - `@text.*` -> `@markup.*` (`strong`, `italic`, `link`, `strikethrough`; with exceptions; see below) - `@text.title` -> `@markup.heading` - `@text.literal` -> `@markup.raw` - `@text.reference` -> `@markup.link` - `@text.uri` -> `@markup.link.url` (in markup links) - `@string.special` -> `@markup.link.label` (non-url links) - `@punctuation.special` -> `@markup.list` (markdown lists only; move subitems from `@text.todo`) * Helix captures (https://docs.helix-editor.com/master/themes.html#syntax-highlighting): - `@method` -> `@function.method` - `@method.call` -> `@function.method.call` - `@text.{todo,warning,note,danger}` -> `@comment.{error,warning,hint,info,todo}` - `@text.diff.{add,delete,}` -> `@diff.{plus,minus,delta}` - `@text.uri` -> `@string.special.url` (outside markup) - `@preproc` -> `@keyword.directive` - `@define` -> `@keyword.directive`(`.define`?) - `@storageclass` -> `@keyword.storage` - `@conditional` -> `@keyword.conditional` - `@debug` -> `@keyword.debug` - `@exception` -> `@keyword.exception` - `@include` -> `@keyword.import` - `@repeat` -> `@keyword.repeat` * cleanup - remove some redundant `@conceal` (but still allow it for conceal-only patterns) - remove obsolete `@error` (syntax linting is out of scope for this repo) - sort, cleanup capture list in `CONTRIBUTING.md`
Diffstat (limited to 'queries')
-rw-r--r--queries/ada/highlights.scm30
-rw-r--r--queries/agda/highlights.scm6
-rw-r--r--queries/angular/highlights.scm2
-rw-r--r--queries/apex/highlights.scm16
-rw-r--r--queries/awk/highlights.scm20
-rw-r--r--queries/bash/highlights.scm20
-rw-r--r--queries/bass/highlights.scm20
-rw-r--r--queries/beancount/highlights.scm2
-rw-r--r--queries/bibtex/highlights.scm6
-rw-r--r--queries/bicep/highlights.scm26
-rw-r--r--queries/bitbake/highlights.scm54
-rw-r--r--queries/blueprint/highlights.scm8
-rw-r--r--queries/c/highlights.scm34
-rw-r--r--queries/c_sharp/highlights.scm44
-rw-r--r--queries/cairo/highlights.scm56
-rw-r--r--queries/capnp/highlights.scm20
-rw-r--r--queries/chatito/highlights.scm10
-rw-r--r--queries/clojure/highlights.scm62
-rw-r--r--queries/cmake/highlights.scm24
-rw-r--r--queries/comment/highlights.scm38
-rw-r--r--queries/commonlisp/highlights.scm26
-rw-r--r--queries/cooklang/highlights.scm6
-rw-r--r--queries/corn/highlights.scm2
-rw-r--r--queries/cpon/highlights.scm4
-rw-r--r--queries/cpp/highlights.scm30
-rw-r--r--queries/css/highlights.scm4
-rw-r--r--queries/cuda/highlights.scm2
-rw-r--r--queries/cue/highlights.scm16
-rw-r--r--queries/d/highlights.scm22
-rw-r--r--queries/dart/highlights.scm20
-rw-r--r--queries/devicetree/highlights.scm4
-rw-r--r--queries/dhall/highlights.scm16
-rw-r--r--queries/diff/highlights.scm4
-rw-r--r--queries/dot/highlights.scm6
-rw-r--r--queries/doxygen/highlights.scm6
-rw-r--r--queries/dtd/highlights.scm20
-rw-r--r--queries/ebnf/highlights.scm4
-rw-r--r--queries/ecma/highlights.scm46
-rw-r--r--queries/elixir/highlights.scm4
-rw-r--r--queries/elm/highlights.scm20
-rw-r--r--queries/elsa/highlights.scm4
-rw-r--r--queries/elvish/highlights.scm22
-rw-r--r--queries/erlang/highlights.scm28
-rw-r--r--queries/facility/highlights.scm2
-rw-r--r--queries/fennel/highlights.scm22
-rw-r--r--queries/firrtl/highlights.scm36
-rw-r--r--queries/fish/highlights.scm24
-rw-r--r--queries/foam/highlights.scm24
-rw-r--r--queries/fortran/highlights.scm28
-rw-r--r--queries/fsh/highlights.scm2
-rw-r--r--queries/func/highlights.scm16
-rw-r--r--queries/fusion/highlights.scm12
-rw-r--r--queries/gdscript/highlights.scm24
-rw-r--r--queries/git_config/highlights.scm16
-rw-r--r--queries/git_rebase/highlights.scm2
-rw-r--r--queries/gitattributes/highlights.scm15
-rw-r--r--queries/gitcommit/highlights.scm22
-rw-r--r--queries/gleam/highlights.scm18
-rw-r--r--queries/glimmer/highlights.scm12
-rw-r--r--queries/glsl/highlights.scm2
-rw-r--r--queries/gn/highlights.scm8
-rw-r--r--queries/go/highlights.scm24
-rw-r--r--queries/go/locals.scm2
-rw-r--r--queries/godot_resource/highlights.scm2
-rw-r--r--queries/gomod/highlights.scm2
-rw-r--r--queries/gosum/highlights.scm4
-rw-r--r--queries/gpg/highlights.scm10
-rw-r--r--queries/graphql/highlights.scm10
-rw-r--r--queries/groovy/highlights.scm6
-rw-r--r--queries/gstlaunch/highlights.scm2
-rw-r--r--queries/hack/highlights.scm30
-rw-r--r--queries/hare/highlights.scm26
-rw-r--r--queries/haskell/highlights.scm50
-rw-r--r--queries/haskell_persistent/highlights.scm4
-rw-r--r--queries/hcl/highlights.scm10
-rw-r--r--queries/heex/highlights.scm2
-rw-r--r--queries/hocon/highlights.scm6
-rw-r--r--queries/hoon/highlights.scm4
-rw-r--r--queries/html_tags/highlights.scm32
-rw-r--r--queries/htmldjango/highlights.scm4
-rw-r--r--queries/http/highlights.scm8
-rw-r--r--queries/hurl/highlights.scm11
-rw-r--r--queries/ini/highlights.scm3
-rw-r--r--queries/ispc/highlights.scm4
-rw-r--r--queries/janet_simple/highlights.scm6
-rw-r--r--queries/java/highlights.scm32
-rw-r--r--queries/javascript/highlights.scm20
-rw-r--r--queries/jq/highlights.scm8
-rw-r--r--queries/jsonnet/highlights.scm16
-rw-r--r--queries/julia/highlights.scm54
-rw-r--r--queries/kconfig/highlights.scm12
-rw-r--r--queries/kdl/highlights.scm4
-rw-r--r--queries/kotlin/highlights.scm26
-rw-r--r--queries/kusto/highlights.scm4
-rw-r--r--queries/lalrpop/highlights.scm6
-rw-r--r--queries/latex/highlights.scm146
-rw-r--r--queries/ledger/highlights.scm6
-rw-r--r--queries/leo/highlights.scm20
-rw-r--r--queries/linkerscript/highlights.scm12
-rw-r--r--queries/liquidsoap/highlights.scm22
-rw-r--r--queries/llvm/highlights.scm6
-rw-r--r--queries/lua/highlights.scm34
-rw-r--r--queries/luadoc/highlights.scm18
-rw-r--r--queries/luap/highlights.scm2
-rw-r--r--queries/luau/highlights.scm36
-rw-r--r--queries/m68k/highlights.scm18
-rw-r--r--queries/make/highlights.scm14
-rw-r--r--queries/markdown/highlights.scm78
-rw-r--r--queries/markdown_inline/highlights.scm57
-rw-r--r--queries/matlab/highlights.scm34
-rw-r--r--queries/menhir/highlights.scm4
-rw-r--r--queries/mermaid/highlights.scm18
-rw-r--r--queries/meson/highlights.scm6
-rw-r--r--queries/mlir/highlights.scm6
-rw-r--r--queries/nasm/highlights.scm14
-rw-r--r--queries/nickel/highlights.scm10
-rw-r--r--queries/nim/highlights.scm132
-rw-r--r--queries/nim_format_string/highlights.scm4
-rw-r--r--queries/ninja/highlights.scm4
-rw-r--r--queries/nix/highlights.scm25
-rw-r--r--queries/nqc/highlights.scm2
-rw-r--r--queries/objc/highlights.scm34
-rw-r--r--queries/objdump/highlights.scm24
-rw-r--r--queries/ocaml/highlights.scm14
-rw-r--r--queries/ocamllex/highlights.scm2
-rw-r--r--queries/odin/highlights.scm40
-rw-r--r--queries/pascal/highlights.scm24
-rw-r--r--queries/passwd/highlights.scm8
-rw-r--r--queries/perl/highlights.scm24
-rw-r--r--queries/php/highlights.scm28
-rw-r--r--queries/phpdoc/highlights.scm14
-rw-r--r--queries/pioasm/highlights.scm6
-rw-r--r--queries/po/highlights.scm2
-rw-r--r--queries/pod/highlights.scm18
-rw-r--r--queries/poe_filter/highlights.scm8
-rw-r--r--queries/pony/highlights.scm46
-rw-r--r--queries/promql/highlights.scm10
-rw-r--r--queries/proto/highlights.scm4
-rw-r--r--queries/prql/highlights.scm14
-rw-r--r--queries/pug/highlights.scm24
-rw-r--r--queries/puppet/highlights.scm28
-rw-r--r--queries/purescript/highlights.scm24
-rw-r--r--queries/python/highlights.scm64
-rw-r--r--queries/ql/highlights.scm12
-rw-r--r--queries/qmldir/highlights.scm4
-rw-r--r--queries/qmljs/highlights.scm6
-rw-r--r--queries/query/highlights.scm12
-rwxr-xr-xqueries/r/highlights.scm24
-rw-r--r--queries/racket/highlights.scm12
-rw-r--r--queries/rasi/highlights.scm6
-rw-r--r--queries/rbs/highlights.scm10
-rw-r--r--queries/re2c/highlights.scm10
-rw-r--r--queries/regex/highlights.scm2
-rw-r--r--queries/rego/highlights.scm12
-rw-r--r--queries/requirements/highlights.scm6
-rw-r--r--queries/robot/highlights.scm20
-rw-r--r--queries/ron/highlights.scm2
-rw-r--r--queries/rst/highlights.scm44
-rw-r--r--queries/ruby/highlights.scm40
-rw-r--r--queries/rust/highlights.scm68
-rw-r--r--queries/scala/highlights.scm43
-rw-r--r--queries/scfg/highlights.scm2
-rw-r--r--queries/scheme/highlights.scm10
-rw-r--r--queries/scss/highlights.scm22
-rw-r--r--queries/slang/highlights.scm2
-rw-r--r--queries/slint/highlights.scm20
-rw-r--r--queries/smali/highlights.scm48
-rw-r--r--queries/smithy/highlights.scm18
-rw-r--r--queries/snakemake/highlights.scm10
-rw-r--r--queries/solidity/highlights.scm50
-rw-r--r--queries/soql/highlights.scm4
-rw-r--r--queries/sparql/highlights.scm14
-rw-r--r--queries/sql/highlights.scm12
-rw-r--r--queries/squirrel/highlights.scm20
-rw-r--r--queries/ssh_config/highlights.scm8
-rw-r--r--queries/starlark/highlights.scm42
-rw-r--r--queries/strace/highlights.scm2
-rw-r--r--queries/supercollider/highlights.scm12
-rw-r--r--queries/surface/highlights.scm4
-rw-r--r--queries/svelte/highlights.scm8
-rw-r--r--queries/swift/highlights.scm32
-rw-r--r--queries/systemtap/highlights.scm18
-rw-r--r--queries/t32/highlights.scm20
-rw-r--r--queries/tablegen/highlights.scm18
-rw-r--r--queries/teal/highlights.scm12
-rw-r--r--queries/templ/highlights.scm2
-rw-r--r--queries/terraform/highlights.scm2
-rw-r--r--queries/textproto/highlights.scm2
-rw-r--r--queries/thrift/highlights.scm20
-rw-r--r--queries/tiger/highlights.scm12
-rw-r--r--queries/tlaplus/highlights.scm48
-rw-r--r--queries/toml/highlights.scm2
-rw-r--r--queries/tsv/highlights.scm2
-rw-r--r--queries/turtle/highlights.scm4
-rw-r--r--queries/twig/highlights.scm8
-rw-r--r--queries/typescript/highlights.scm28
-rw-r--r--queries/typoscript/highlights.scm6
-rw-r--r--queries/ungrammar/highlights.scm2
-rw-r--r--queries/unison/highlights.scm16
-rw-r--r--queries/usd/highlights.scm10
-rw-r--r--queries/uxntal/highlights.scm14
-rw-r--r--queries/v/highlights.scm30
-rw-r--r--queries/vala/highlights.scm44
-rw-r--r--queries/verilog/highlights.scm24
-rw-r--r--queries/vhs/highlights.scm7
-rw-r--r--queries/vim/highlights.scm22
-rw-r--r--queries/vimdoc/highlights.scm44
-rw-r--r--queries/vue/highlights.scm2
-rw-r--r--queries/wgsl/highlights.scm12
-rw-r--r--queries/wgsl_bevy/highlights.scm10
-rw-r--r--queries/wing/highlights.scm10
-rw-r--r--queries/xcompose/highlights.scm2
-rw-r--r--queries/xml/highlights.scm14
-rw-r--r--queries/yaml/highlights.scm10
-rw-r--r--queries/yang/highlights.scm6
-rw-r--r--queries/yuck/highlights.scm14
-rw-r--r--queries/zig/highlights.scm22
217 files changed, 1960 insertions, 1963 deletions
diff --git a/queries/ada/highlights.scm b/queries/ada/highlights.scm
index 694763073..a88935b2a 100644
--- a/queries/ada/highlights.scm
+++ b/queries/ada/highlights.scm
@@ -44,7 +44,7 @@
"aliased"
"constant"
"renames"
-] @storageclass
+] @keyword.storage
[
"mod"
"new"
@@ -56,7 +56,7 @@
[
"with"
"use"
-] @include
+] @keyword.import
[
"body"
"function"
@@ -79,7 +79,7 @@
"parallel"
"reverse"
"some"
-] @repeat
+] @keyword.repeat
[
"return"
] @keyword.return
@@ -90,11 +90,11 @@
"then"
"elsif"
"select"
-] @conditional
+] @keyword.conditional
[
"exception"
"raise"
-] @exception
+] @keyword.exception
(comment) @comment @spell
(string_literal) @string
(character_literal) @string
@@ -109,24 +109,24 @@
(entry_declaration . (identifier) @function)
;; Some keywords should take different categories depending on the context
-(use_clause "use" @include "type" @include)
-(with_clause "private" @include)
-(with_clause "limited" @include)
-(use_clause (_) @namespace)
-(with_clause (_) @namespace)
+(use_clause "use" @keyword.import "type" @keyword.import)
+(with_clause "private" @keyword.import)
+(with_clause "limited" @keyword.import)
+(use_clause (_) @module)
+(with_clause (_) @module)
(loop_statement "end" @keyword.repeat)
-(if_statement "end" @conditional)
+(if_statement "end" @keyword.conditional)
(loop_parameter_specification "in" @keyword.repeat)
(loop_parameter_specification "in" @keyword.repeat)
(iterator_specification ["in" "of"] @keyword.repeat)
(range_attribute_designator "range" @keyword.repeat)
-(raise_statement "with" @exception)
+(raise_statement "with" @keyword.exception)
-(gnatprep_declarative_if_statement) @preproc
-(gnatprep_if_statement) @preproc
-(gnatprep_identifier) @preproc
+(gnatprep_declarative_if_statement) @keyword.directive
+(gnatprep_if_statement) @keyword.directive
+(gnatprep_identifier) @keyword.directive
(subprogram_declaration "is" @keyword.function "abstract" @keyword.function)
(aspect_specification "with" @keyword.function)
diff --git a/queries/agda/highlights.scm b/queries/agda/highlights.scm
index a5c42c0a8..6ff55d2fc 100644
--- a/queries/agda/highlights.scm
+++ b/queries/agda/highlights.scm
@@ -27,13 +27,13 @@
;; Imports and Module Declarations
-"import" @include
+"import" @keyword.import
-(module_name) @namespace
+(module_name) @module
;; Pragmas and comments
-(pragma) @preproc
+(pragma) @keyword.directive
(comment) @comment @spell
diff --git a/queries/angular/highlights.scm b/queries/angular/highlights.scm
index dc926bb9a..42d69c28a 100644
--- a/queries/angular/highlights.scm
+++ b/queries/angular/highlights.scm
@@ -6,7 +6,7 @@
name: (identifier) @function)
(pipe_call
arguments: (pipe_arguments
- (identifier) @parameter))
+ (identifier) @variable.parameter))
(structural_assignment
operator: (identifier) @keyword)
diff --git a/queries/apex/highlights.scm b/queries/apex/highlights.scm
index f5ce0b9fb..729a84d15 100644
--- a/queries/apex/highlights.scm
+++ b/queries/apex/highlights.scm
@@ -28,10 +28,10 @@
;; Methods
(method_declaration
- name: (identifier) @method)
+ name: (identifier) @function.method)
(method_invocation
- name: (identifier) @method.call)
+ name: (identifier) @function.method.call)
(super) @function.builtin
@@ -77,7 +77,7 @@
(method_declaration
(formal_parameters
(formal_parameter
- name: (identifier) @parameter)))
+ name: (identifier) @variable.parameter)))
(constructor_declaration
name: (identifier) @constructor)
@@ -142,10 +142,10 @@
(field_declaration
declarator: (variable_declarator
- name: (identifier) @field))
+ name: (identifier) @variable.member))
(field_access
- field: (identifier) @field)
+ field: (identifier) @variable.member)
; Variables
@@ -194,14 +194,14 @@
"if"
"else"
"switch"
-] @conditional
+] @keyword.conditional
[
"for"
"while"
"do"
"break"
-] @repeat
+] @keyword.repeat
[
"return"
@@ -212,7 +212,7 @@
"finally"
"try"
"catch"
- ] @exception
+ ] @keyword.exception
"new" @keyword.operator
diff --git a/queries/awk/highlights.scm b/queries/awk/highlights.scm
index 4faf496e6..6d3b7ff0b 100644
--- a/queries/awk/highlights.scm
+++ b/queries/awk/highlights.scm
@@ -47,21 +47,21 @@
(number) @number
(string) @string
-(regex) @string.regex
+(regex) @string.regexp
(escape_sequence) @string.escape
(comment) @comment @spell
-((program . (comment) @preproc)
- (#lua-match? @preproc "^#!/"))
+((program . (comment) @keyword.directive)
+ (#lua-match? @keyword.directive "^#!/"))
-(ns_qualified_name (namespace) @namespace)
+(ns_qualified_name (namespace) @module)
(ns_qualified_name "::" @punctuation.delimiter)
(func_def name: (_ (identifier) @function) @function)
(func_call name: (_ (identifier) @function) @function)
-(func_def (param_list (identifier) @parameter))
+(func_def (param_list (identifier) @variable.parameter))
[
"print"
@@ -92,7 +92,7 @@
"while"
"for"
"in"
-] @repeat
+] @keyword.repeat
[
"if"
@@ -100,14 +100,14 @@
"switch"
"case"
"default"
-] @conditional
+] @keyword.conditional
[
"@include"
"@load"
-] @include
+] @keyword.import
-"@namespace" @preproc
+"@namespace" @keyword.directive
[
"BEGIN"
@@ -156,7 +156,7 @@
(ternary_exp [
"?"
":"
-] @conditional.ternary)
+] @keyword.conditional.ternary)
(update_exp [
"++"
diff --git a/queries/bash/highlights.scm b/queries/bash/highlights.scm
index 4ffae437e..033f9fbee 100644
--- a/queries/bash/highlights.scm
+++ b/queries/bash/highlights.scm
@@ -70,7 +70,7 @@
"case"
"in"
"esac"
-] @conditional
+] @keyword.conditional
[
"for"
@@ -79,7 +79,7 @@
"select"
"until"
"while"
-] @repeat
+] @keyword.repeat
[
"declare"
@@ -115,7 +115,7 @@
(arithmetic_expansion "," @punctuation.delimiter)
-(ternary_expression [ "?" ":" ] @conditional.ternary)
+(ternary_expression [ "?" ":" ] @keyword.conditional.ternary)
(binary_expression operator: _ @operator)
(unary_expression operator: _ @operator)
@@ -140,8 +140,8 @@
(command
argument: [
- (word) @parameter
- (concatenation (word) @parameter)
+ (word) @variable.parameter
+ (concatenation (word) @variable.parameter)
])
(number) @number
@@ -149,7 +149,7 @@
(#lua-match? @number "^[0-9]+$"))
(file_redirect
- destination: (word) @parameter)
+ destination: (word) @variable.parameter)
(file_descriptor) @operator
@@ -175,12 +175,12 @@
(#lua-match? @constant "^[A-Z][A-Z_0-9]*$"))
(case_item
- value: (word) @parameter)
+ value: (word) @variable.parameter)
[
(regex)
(extglob_pattern)
-] @string.regex
+] @string.regexp
-((program . (comment) @preproc)
- (#lua-match? @preproc "^#!/"))
+((program . (comment) @keyword.directive)
+ (#lua-match? @keyword.directive "^#!/"))
diff --git a/queries/bass/highlights.scm b/queries/bass/highlights.scm
index 296443d52..3a16cbb34 100644
--- a/queries/bass/highlights.scm
+++ b/queries/bass/highlights.scm
@@ -21,13 +21,13 @@
;; Namespaces
(symbind
- (symbol) @namespace
+ (symbol) @module
. (keyword))
;; Includes
-((symbol) @include
- (#any-of? @include "use" "import" "load"))
+((symbol) @keyword.import
+ (#any-of? @keyword.import "use" "import" "load"))
;; Keywords
@@ -43,13 +43,13 @@
((list
. (symbol) @keyword.function
. (symbol) @function
- (symbol)? @parameter)
+ (symbol)? @variable.parameter)
(#any-of? @keyword.function "def" "defop" "defn" "fn"))
((cons
. (symbol) @keyword.function
. (symbol) @function
- (symbol)? @parameter)
+ (symbol)? @variable.parameter)
(#any-of? @keyword.function "def" "defop" "defn" "fn"))
((symbol) @function.builtin
@@ -60,13 +60,13 @@
;; Conditionals
-((symbol) @conditional
- (#any-of? @conditional "if" "case" "cond" "when"))
+((symbol) @keyword.conditional
+ (#any-of? @keyword.conditional "if" "case" "cond" "when"))
;; Repeats
-((symbol) @repeat
- (#any-of? @repeat "each"))
+((symbol) @keyword.repeat
+ (#any-of? @keyword.repeat "each"))
;; Operators
@@ -89,7 +89,7 @@
(escape_sequence) @string.escape
-(path) @text.uri @string.special
+(path) @string.special.url
(number) @number
diff --git a/queries/beancount/highlights.scm b/queries/beancount/highlights.scm
index 5817fb2e2..191dc519e 100644
--- a/queries/beancount/highlights.scm
+++ b/queries/beancount/highlights.scm
@@ -1,4 +1,4 @@
-(date) @field
+(date) @variable.member
(txn) @attribute
(account) @type
(amount) @number
diff --git a/queries/bibtex/highlights.scm b/queries/bibtex/highlights.scm
index bd240f581..602ed5d27 100644
--- a/queries/bibtex/highlights.scm
+++ b/queries/bibtex/highlights.scm
@@ -23,10 +23,10 @@
(number) @number
(field
- name: (identifier) @field)
+ name: (identifier) @variable.member)
(token
- (identifier) @parameter)
+ (identifier) @variable.parameter)
[
(brace_word)
@@ -36,7 +36,7 @@
[
(key_brace)
(key_paren)
-] @symbol
+] @string.special.symbol
(string
name: (identifier) @constant)
diff --git a/queries/bicep/highlights.scm b/queries/bicep/highlights.scm
index b555edb37..ae691c76b 100644
--- a/queries/bicep/highlights.scm
+++ b/queries/bicep/highlights.scm
@@ -1,16 +1,16 @@
; Includes
(import_statement
- "import" @include)
+ "import" @keyword.import)
(import_with_statement
- "import" @include
- "with" @include)
+ "import" @keyword.import
+ "with" @keyword.import)
; Namespaces
(module_declaration
- (identifier) @namespace)
+ (identifier) @module)
; Builtins
@@ -80,16 +80,16 @@
; Parameters
(parameter_declaration
- (identifier) @parameter
+ (identifier) @variable.parameter
(_))
(call_expression
function: (_)
- (arguments (identifier) @parameter))
+ (arguments (identifier) @variable.parameter))
(call_expression
function: (_)
- (arguments (member_expression object: (identifier) @parameter)))
+ (arguments (member_expression object: (identifier) @variable.parameter)))
; Variables
@@ -118,16 +118,16 @@
; Conditionals
-"if" @conditional
+"if" @keyword.conditional
(ternary_expression
- "?" @conditional.ternary
- ":" @conditional.ternary)
+ "?" @keyword.conditional.ternary
+ ":" @keyword.conditional.ternary)
; Loops
(for_statement
- "for" @repeat
+ "for" @keyword.repeat
"in"
":" @punctuation.delimiter)
@@ -179,8 +179,8 @@
(string) @string
(import_string
"'" @string
- (import_name) @namespace
- "@" @symbol
+ (import_name) @module
+ "@" @string.special.symbol
(import_version) @string.special)
(escape_sequence) @string.escape
diff --git a/queries/bitbake/highlights.scm b/queries/bitbake/highlights.scm
index 46eaf11e3..c4f51d624 100644
--- a/queries/bitbake/highlights.scm
+++ b/queries/bitbake/highlights.scm
@@ -6,7 +6,7 @@
"require"
"export"
"import"
-] @include
+] @keyword.import
; Keywords
@@ -37,16 +37,16 @@
(yield "from" @keyword.return)
(future_import_statement
- "from" @include
+ "from" @keyword.import
"__future__" @constant.builtin)
-(import_from_statement "from" @include)
-"import" @include
+(import_from_statement "from" @keyword.import)
+"import" @keyword.import
-(aliased_import "as" @include)
+(aliased_import "as" @keyword.import)
-["if" "elif" "else"] @conditional
+["if" "elif" "else"] @keyword.conditional
-["for" "while" "break" "continue"] @repeat
+["for" "while" "break" "continue"] @keyword.repeat
[
"try"
@@ -54,13 +54,13 @@
"except*"
"raise"
"finally"
-] @exception
+] @keyword.exception
-(raise_statement "from" @exception)
+(raise_statement "from" @keyword.exception)
(try_statement
(else_clause
- "else" @exception))
+ "else" @keyword.exception))
[
"addtask"
@@ -73,7 +73,7 @@
[
"before"
"after"
-] @storageclass
+] @keyword.storage
[
"append"
@@ -132,11 +132,11 @@
; Fields
-(flag) @field
+(flag) @variable.member
((attribute
- attribute: (python_identifier) @field)
- (#lua-match? @field "^[%l_].*$"))
+ attribute: (python_identifier) @variable.member)
+ (#lua-match? @variable.member "^[%l_].*$"))
; Functions
@@ -145,7 +145,7 @@
(call
function: (attribute
- attribute: (python_identifier) @method.call))
+ attribute: (python_identifier) @function.method.call))
((call
function: (python_identifier) @constructor)
@@ -200,34 +200,34 @@
; Namespace
-(inherit_path) @namespace
+(inherit_path) @module
;; Normal parameters
(parameters
- (python_identifier) @parameter)
+ (python_identifier) @variable.parameter)
;; Lambda parameters
(lambda_parameters
- (python_identifier) @parameter)
+ (python_identifier) @variable.parameter)
(lambda_parameters
(tuple_pattern
- (python_identifier) @parameter))
+ (python_identifier) @variable.parameter))
; Default parameters
(keyword_argument
- name: (python_identifier) @parameter)
+ name: (python_identifier) @variable.parameter)
; Naming parameters on call-site
(default_parameter
- name: (python_identifier) @parameter)
+ name: (python_identifier) @variable.parameter)
(typed_parameter
- (python_identifier) @parameter)
+ (python_identifier) @variable.parameter)
(typed_default_parameter
- (python_identifier) @parameter)
+ (python_identifier) @variable.parameter)
; Variadic parameters *args, **kwargs
(parameters
(list_splat_pattern ; *args
- (python_identifier) @parameter))
+ (python_identifier) @variable.parameter))
(parameters
(dictionary_splat_pattern ; **kwargs
- (python_identifier) @parameter))
+ (python_identifier) @variable.parameter))
;; Literals
@@ -239,7 +239,7 @@
(#eq? @variable.builtin "cls"))
(integer) @number
-(float) @float
+(float) @number.float
; Operators
@@ -309,7 +309,7 @@
"\""
] @string
-(include_path) @string.special
+(include_path) @string.special.path
[
(escape_sequence)
diff --git a/queries/blueprint/highlights.scm b/queries/blueprint/highlights.scm
index d85986ffd..3e3a8e4a8 100644
--- a/queries/blueprint/highlights.scm
+++ b/queries/blueprint/highlights.scm
@@ -9,7 +9,7 @@
(boolean) @boolean
-(using) @include
+(using) @keyword.import
(template) @keyword
@@ -34,11 +34,11 @@
(template_definition (template_name_qualifier) @type.qualifier)
-(import_statement (gobject_library) @namespace)
+(import_statement (gobject_library) @module)
-(import_statement (version_number) @float)
+(import_statement (version_number) @number.float)
-(float) @float
+(float) @number.float
(number) @number
[
diff --git a/queries/c/highlights.scm b/queries/c/highlights.scm
index 74656e336..33c30f095 100644
--- a/queries/c/highlights.scm
+++ b/queries/c/highlights.scm
@@ -1,4 +1,4 @@
-; Lower priority to prefer @parameter when identifier appears in parameter_declaration.
+; Lower priority to prefer @variable.parameter when identifier appears in parameter_declaration.
((identifier) @variable (#set! "priority" 95))
(preproc_def (preproc_arg) @variable)
@@ -27,14 +27,14 @@
"do"
"continue"
"break"
-] @repeat
+] @keyword.repeat
[
"if"
"else"
"case"
"switch"
-] @conditional
+] @keyword.conditional
[
"#if"
@@ -46,11 +46,11 @@
"#elifdef"
"#elifndef"
(preproc_directive)
-] @preproc
+] @keyword.directive
-"#define" @define
+"#define" @keyword.directive.define
-"#include" @include
+"#include" @keyword.import
[ ";" ":" "," "::" ] @punctuation.delimiter
@@ -111,7 +111,7 @@
(false)
] @boolean
-(conditional_expression [ "?" ":" ] @conditional.ternary)
+(conditional_expression [ "?" ":" ] @keyword.conditional.ternary)
(string_literal) @string
(system_lib_string) @string
@@ -140,7 +140,7 @@
(type_descriptor)
] @type
-(storage_class_specifier) @storageclass
+(storage_class_specifier) @keyword.storage
[
(type_qualifier)
@@ -149,7 +149,7 @@
] @type.qualifier
(linkage_specification
- "extern" @storageclass)
+ "extern" @keyword.storage)
(type_definition
declarator: (type_identifier) @type.definition)
@@ -236,13 +236,13 @@
;; Parameters
(parameter_declaration
- declarator: (identifier) @parameter)
+ declarator: (identifier) @variable.parameter)
(parameter_declaration
- declarator: (array_declarator) @parameter)
+ declarator: (array_declarator) @variable.parameter)
(parameter_declaration
- declarator: (pointer_declarator) @parameter)
+ declarator: (pointer_declarator) @variable.parameter)
; K&R functions
; To enable support for K&R functions,
@@ -250,24 +250,24 @@
; They are commented out as they'll conflict with C++
; Note that you'll need to have `; extends` at the top of your query file.
;
-; (parameter_list (identifier) @parameter)
+; (parameter_list (identifier) @variable.parameter)
;
; (function_definition
; declarator: _
; (declaration
-; declarator: (identifier) @parameter))
+; declarator: (identifier) @variable.parameter))
;
; (function_definition
; declarator: _
; (declaration
-; declarator: (array_declarator) @parameter))
+; declarator: (array_declarator) @variable.parameter))
;
; (function_definition
; declarator: _
; (declaration
-; declarator: (pointer_declarator) @parameter))
+; declarator: (pointer_declarator) @variable.parameter))
-(preproc_params (identifier) @parameter)
+(preproc_params (identifier) @variable.parameter)
[
"__attribute__"
diff --git a/queries/c_sharp/highlights.scm b/queries/c_sharp/highlights.scm
index bc74a16ff..1cd566728 100644
--- a/queries/c_sharp/highlights.scm
+++ b/queries/c_sharp/highlights.scm
@@ -5,10 +5,10 @@
(#has-ancestor? @keyword accessor_declaration))
(method_declaration
- name: (identifier) @method)
+ name: (identifier) @function.method)
(local_function_statement
- name: (identifier) @method)
+ name: (identifier) @function.method)
(method_declaration
type: (identifier) @type)
@@ -23,41 +23,41 @@
(invocation_expression
(member_access_expression
- name: (identifier) @method.call))
+ name: (identifier) @function.method.call))
(invocation_expression
function: (conditional_access_expression
(member_binding_expression
- name: (identifier) @method.call)))
+ name: (identifier) @function.method.call)))
(namespace_declaration
- name: [(qualified_name) (identifier)] @namespace)
+ name: [(qualified_name) (identifier)] @module)
(qualified_name
(identifier) @type)
(invocation_expression
- (identifier) @method.call)
+ (identifier) @function.method.call)
(field_declaration
(variable_declaration
(variable_declarator
- (identifier) @field)))
+ (identifier) @variable.member)))
(initializer_expression
(assignment_expression
- left: (identifier) @field))
+ left: (identifier) @variable.member))
(parameter_list
(parameter
- name: (identifier) @parameter))
+ name: (identifier) @variable.parameter))
(parameter_list
(parameter
type: (identifier) @type))
(integer_literal) @number
-(real_literal) @float
+(real_literal) @number.float
(null_literal) @constant.builtin
(character_literal) @character
@@ -154,12 +154,12 @@
; Generic Method invocation with generic type
(invocation_expression
function: (generic_name
- . (identifier) @method.call))
+ . (identifier) @function.method.call))
(invocation_expression
(member_access_expression
(generic_name
- (identifier) @method)))
+ (identifier) @function.method)))
(base_list
(identifier) @type)
@@ -194,10 +194,10 @@
(identifier) @type)
(name_colon
- (identifier) @parameter)
+ (identifier) @variable.parameter)
-(warning_directive) @text.warning
-(error_directive) @exception
+(warning_directive) @comment.warning
+(error_directive) @keyword.exception
(define_directive
(identifier) @constant) @constant.macro
@@ -231,7 +231,7 @@
(elif_directive)
(else_directive)
(endif_directive)
-] @conditional
+] @keyword.conditional
(if_directive
(identifier) @constant)
@@ -245,14 +245,14 @@
"continue"
"goto"
"foreach"
-] @repeat
+] @keyword.repeat
[
"try"
"catch"
"throw"
"finally"
-] @exception
+] @keyword.exception
[
"+"
@@ -304,7 +304,7 @@
":"
] @punctuation.delimiter
-(conditional_expression ["?" ":"] @conditional.ternary)
+(conditional_expression ["?" ":"] @keyword.conditional.ternary)
[
"["
@@ -325,10 +325,10 @@
[
"using"
"as"
-] @include
+] @keyword.import
(alias_qualified_name
- (identifier "global") @include)
+ (identifier "global") @keyword.import)
[
"with"
@@ -385,7 +385,7 @@
"static"
"volatile"
"required"
-] @storageclass
+] @keyword.storage
[
"abstract"
diff --git a/queries/cairo/highlights.scm b/queries/cairo/highlights.scm
index 715644fcc..f8bacede9 100644
--- a/queries/cairo/highlights.scm
+++ b/queries/cairo/highlights.scm
@@ -3,17 +3,17 @@
[
"%builtins"
"%lang"
-] @preproc
+] @keyword.directive
; Includes
-(import_statement [ "from" "import" ] @include module_name: (dotted_name (identifier) @namespace . ))
+(import_statement [ "from" "import" ] @keyword.import module_name: (dotted_name (identifier) @module . ))
[
"as"
"use"
"mod"
-] @include
+] @keyword.import
; Variables
@@ -21,24 +21,24 @@
; Namespaces
-(namespace_definition (identifier) @namespace)
+(namespace_definition (identifier) @module)
(mod_item
- name: (identifier) @namespace)
+ name: (identifier) @module)
-(use_list (self) @namespace)
+(use_list (self) @module)
-(scoped_use_list (self) @namespace)
+(scoped_use_list (self) @module)
(scoped_identifier
- path: (identifier) @namespace)
+ path: (identifier) @module)
(scoped_identifier
(scoped_identifier
- name: (identifier) @namespace))
+ name: (identifier) @module))
(scoped_type_identifier
- path: (identifier) @namespace)
+ path: (identifier) @module)
((scoped_identifier
path: (identifier) @type)
@@ -65,13 +65,13 @@
(#lua-match? @constant "^[A-Z]"))
(scoped_use_list
- path: (identifier) @namespace)
+ path: (identifier) @module)
(scoped_use_list
path: (scoped_identifier
- (identifier) @namespace))
+ (identifier) @module))
-(use_list (scoped_identifier (identifier) @namespace . (_)))
+(use_list (scoped_identifier (identifier) @module . (_)))
(use_list (identifier) @type (#lua-match? @type "^[A-Z]"))
@@ -125,47 +125,47 @@
[
"tempvar"
"extern"
-] @storageclass
+] @keyword.storage
[
"if"
"else"
"match"
-] @conditional
+] @keyword.conditional
[
"loop"
-] @repeat
+] @keyword.repeat
[
"assert"
"static_assert"
"nopanic"
-] @exception
+] @keyword.exception
; Fields
-(implicit_arguments (typed_identifier (identifier) @field))
+(implicit_arguments (typed_identifier (identifier) @variable.member))
-(member_expression "." (identifier) @field)
+(member_expression "." (identifier) @variable.member)
-(call_expression (assignment_expression left: (identifier) @field))
+(call_expression (assignment_expression left: (identifier) @variable.member))
-(tuple_expression (assignment_expression left: (identifier) @field))
+(tuple_expression (assignment_expression left: (identifier) @variable.member))
-(field_identifier) @field
+(field_identifier) @variable.member
-(shorthand_field_initializer (identifier) @field)
+(shorthand_field_initializer (identifier) @variable.member)
; Parameters
-(arguments (typed_identifier (identifier) @parameter))
+(arguments (typed_identifier (identifier) @variable.parameter))
-(call_expression (tuple_expression (assignment_expression left: (identifier) @parameter)))
+(call_expression (tuple_expression (assignment_expression left: (identifier) @variable.parameter)))
-(return_type (tuple_type (named_type . (identifier) @parameter)))
+(return_type (tuple_type (named_type . (identifier) @variable.parameter)))
-(parameter (identifier) @parameter)
+(parameter (identifier) @variable.parameter)
; Builtins
@@ -202,7 +202,7 @@
; Types
-(struct_definition . (identifier) @type (typed_identifier (identifier) @field)?)
+(struct_definition . (identifier) @type (typed_identifier (identifier) @variable.member)?)
(named_type (identifier) @type .)
diff --git a/queries/capnp/highlights.scm b/queries/capnp/highlights.scm
index f3954ae8c..80c8262e7 100644
--- a/queries/capnp/highlights.scm
+++ b/queries/capnp/highlights.scm
@@ -3,7 +3,7 @@
[
(unique_id)
(top_level_annotation_body)
-] @preproc
+] @keyword.directive
; Includes
@@ -12,9 +12,9 @@
"$import"
"embed"
"using"
-] @include
+] @keyword.import
-(import_path) @string @text.uri
+(import_path) @string.special.path
; Keywords
@@ -53,11 +53,11 @@
[
(annotation_definition_identifier)
(method_identifier)
-] @method
+] @function.method
; Fields
-(field_identifier) @field
+(field_identifier) @variable.member
; Properties
@@ -68,9 +68,9 @@
[
(param_identifier)
(return_identifier)
-] @parameter
+] @variable.parameter
-(annotation_target) @parameter.builtin
+(annotation_target) @variable.parameter.builtin
; Constants
@@ -110,7 +110,7 @@
(namespace)
] @string
-(namespace) @text.underline
+(namespace) @string.special
(escape_sequence) @string.escape
@@ -118,11 +118,11 @@
(number) @number
-(float) @float
+(float) @number.float
(boolean) @boolean
-(data_hex) @symbol
+(data_hex) @string.special.symbol
; Punctuation
diff --git a/queries/chatito/highlights.scm b/queries/chatito/highlights.scm
index 12a344523..913787012 100644
--- a/queries/chatito/highlights.scm
+++ b/queries/chatito/highlights.scm
@@ -12,14 +12,14 @@
[":" ","] @punctuation.delimiter
-(["\"" "'"] @punctuation.special @conceal
+(["\"" "'"] @punctuation.special
(#set! conceal ""))
["%" "?" "#"] @character.special
;; Entities
-(intent) @namespace
+(intent) @module
(slot) @type
@@ -37,13 +37,13 @@
;; Import
-"import" @include
+"import" @keyword.import
-(file) @string.special
+(file) @string.special.path
;; Text
-(word) @text @spell
+(word) @spell
;; Comment
diff --git a/queries/clojure/highlights.scm b/queries/clojure/highlights.scm
index 2d3922adf..d0b0bf0cb 100644
--- a/queries/clojure/highlights.scm
+++ b/queries/clojure/highlights.scm
@@ -17,14 +17,14 @@
(dis_expr) @comment
(#set! "priority" 105) ; Higher priority to mark the whole sexpr as a comment
)
-(kwd_lit) @symbol
+(kwd_lit) @string.special.symbol
(str_lit) @string
(num_lit) @number
(char_lit) @character
(bool_lit) @boolean
(nil_lit) @constant.builtin
(comment) @comment @spell
-(regex_lit) @string.regex
+(regex_lit) @string.regexp
["'" "`"] @string.escape
@@ -49,13 +49,13 @@
; Quoted symbols
(quoting_lit
- (sym_lit) @symbol)
+ (sym_lit) @string.special.symbol)
(syn_quoting_lit
- (sym_lit) @symbol)
+ (sym_lit) @string.special.symbol)
; Used in destructure pattern
-((sym_lit) @parameter
- (#lua-match? @parameter "^[&]"))
+((sym_lit) @variable.parameter
+ (#lua-match? @variable.parameter "^[&]"))
; Inline function variables
((sym_lit) @variable.builtin
@@ -102,19 +102,19 @@
; Interop
; (.instanceMember instance args*)
; (.instanceMember Classname args*)
-((sym_lit) @method
- (#lua-match? @method "^%.[^-]"))
+((sym_lit) @function.method
+ (#lua-match? @function.method "^%.[^-]"))
; (.-instanceField instance)
-((sym_lit) @field
- (#lua-match? @field "^%.%-.*"))
+((sym_lit) @variable.member
+ (#lua-match? @variable.member "^%.%-.*"))
; Classname/staticField
-((sym_lit) @field
- (#lua-match? @field "^[%u].*/.+"))
+((sym_lit) @variable.member
+ (#lua-match? @variable.member "^[%u].*/.+"))
; (Classname/staticMethod args*)
(list_lit
.
- (sym_lit) @method
- (#lua-match? @method "^[%u].*/.+"))
+ (sym_lit) @function.method
+ (#lua-match? @function.method "^[%u].*/.+"))
;; TODO: Special casing for the `.` macro
; Operators
@@ -145,29 +145,29 @@
(#any-of? @comment "comment"))
; Conditionals
-((sym_lit) @conditional
- (#any-of? @conditional
+((sym_lit) @keyword.conditional
+ (#any-of? @keyword.conditional
"case" "cond" "cond->" "cond->>" "condp"))
-((sym_lit) @conditional
- (#any-of? @conditional
+((sym_lit) @keyword.conditional
+ (#any-of? @keyword.conditional
"if" "if-let" "if-not" "if-some"))
-((sym_lit) @conditional
- (#any-of? @conditional
+((sym_lit) @keyword.conditional
+ (#any-of? @keyword.conditional
"when" "when-first" "when-let" "when-not" "when-some"))
; Repeats
-((sym_lit) @repeat
- (#any-of? @repeat
+((sym_lit) @keyword.repeat
+ (#any-of? @keyword.repeat
"doseq" "dotimes" "for" "loop" "recur" "while"))
; Exception
-((sym_lit) @exception
- (#any-of? @exception
+((sym_lit) @keyword.exception
+ (#any-of? @keyword.exception
"throw" "try" "catch" "finally"))
; Includes
-((sym_lit) @include
- (#any-of? @include "ns" "import" "require" "use"))
+((sym_lit) @keyword.import
+ (#any-of? @keyword.import "ns" "import" "require" "use"))
; Builtin macros
;; TODO: Do all these items belong here?
@@ -350,18 +350,18 @@
;; TODO: Reproduce bug and file ticket
;.
;[(vec_lit
- ; (sym_lit)* @parameter)
+ ; (sym_lit)* @variable.parameter)
; (list_lit
; (vec_lit
- ; (sym_lit)* @parameter))])
+ ; (sym_lit)* @variable.parameter))])
;[((list_lit
; (vec_lit
-; (sym_lit) @parameter)
+; (sym_lit) @variable.parameter)
; (_)
; +
; ((vec_lit
-; (sym_lit) @parameter)
+; (sym_lit) @variable.parameter)
; (_)))
@@ -378,4 +378,4 @@
(sym_lit) @_include
(#eq? @_include "ns")
.
- (sym_lit) @namespace)
+ (sym_lit) @module)
diff --git a/queries/cmake/highlights.scm b/queries/cmake/highlights.scm
index af6b70cc8..bdad657e3 100644
--- a/queries/cmake/highlights.scm
+++ b/queries/cmake/highlights.scm
@@ -21,7 +21,7 @@
(normal_command (identifier) @function)
-["ENV" "CACHE"] @storageclass
+["ENV" "CACHE"] @keyword.storage
["$" "{" "}" "<" ">"] @punctuation.special
["(" ")"] @punctuation.bracket
@@ -37,18 +37,18 @@
(elseif)
(else)
(endif)
-] @conditional
+] @keyword.conditional
[
(foreach)
(endforeach)
(while)
(endwhile)
-] @repeat
+] @keyword.repeat
(normal_command
- (identifier) @repeat
- (#match? @repeat "\\c^(continue|break)$")
+ (identifier) @keyword.repeat
+ (#match? @keyword.repeat "\\c^(continue|break)$")
)
(normal_command
(identifier) @keyword.return
@@ -59,7 +59,7 @@
(function)
(argument_list
. (argument) @function
- (argument)* @parameter
+ (argument)* @variable.parameter
)
)
@@ -67,7 +67,7 @@
(macro)
(argument_list
. (argument) @function.macro
- (argument)* @parameter
+ (argument)* @variable.parameter
)
)
@@ -134,7 +134,7 @@
(argument_list
. (argument)
(
- (argument) @_cache @storageclass
+ (argument) @_cache @keyword.storage
.
(argument) @_type @type
(#any-of? @_cache "CACHE")
@@ -148,8 +148,8 @@
(#match? @_function "\\c^unset$")
(argument_list
. (argument)
- (argument) @storageclass
- (#any-of? @storageclass "CACHE" "PARENT_SCOPE")
+ (argument) @keyword.storage
+ (#any-of? @keyword.storage "CACHE" "PARENT_SCOPE")
)
)
@@ -213,5 +213,5 @@
(escape_sequence) @string.escape
-((source_file . (line_comment) @preproc)
- (#lua-match? @preproc "^#!/"))
+((source_file . (line_comment) @keyword.directive)
+ (#lua-match? @keyword.directive "^#!/"))
diff --git a/queries/comment/highlights.scm b/queries/comment/highlights.scm
index 87491c7a5..41b653e93 100644
--- a/queries/comment/highlights.scm
+++ b/queries/comment/highlights.scm
@@ -1,41 +1,43 @@
((tag
- (name) @text.todo @nospell
- ("(" @punctuation.bracket (user) @constant ")" @punctuation.bracket)?
+ (name) @comment.todo @nospell
+ ("(" @punctuation.bracket
+ (user) @constant
+ ")" @punctuation.bracket)?
":" @punctuation.delimiter)
- (#any-of? @text.todo "TODO" "WIP"))
+ (#any-of? @comment.todo "TODO" "WIP"))
-("text" @text.todo @nospell
- (#any-of? @text.todo "TODO" "WIP"))
+("text" @comment.todo @nospell
+ (#any-of? @comment.todo "TODO" "WIP"))
((tag
- (name) @text.note @nospell
+ (name) @comment.note @nospell
("(" @punctuation.bracket (user) @constant ")" @punctuation.bracket)?
":" @punctuation.delimiter)
- (#any-of? @text.note "NOTE" "XXX" "INFO" "DOCS" "PERF" "TEST"))
+ (#any-of? @comment.note "NOTE" "XXX" "INFO" "DOCS" "PERF" "TEST"))
-("text" @text.note @nospell
- (#any-of? @text.note "NOTE" "XXX" "INFO" "DOCS" "PERF" "TEST"))
+("text" @comment.note @nospell
+ (#any-of? @comment.note "NOTE" "XXX" "INFO" "DOCS" "PERF" "TEST"))
((tag
- (name) @text.warning @nospell
+ (name) @comment.warning @nospell
("(" @punctuation.bracket (user) @constant ")" @punctuation.bracket)?
":" @punctuation.delimiter)
- (#any-of? @text.warning "HACK" "WARNING" "WARN" "FIX"))
+ (#any-of? @comment.warning "HACK" "WARNING" "WARN" "FIX"))
-("text" @text.warning @nospell
- (#any-of? @text.warning "HACK" "WARNING" "WARN" "FIX"))
+("text" @comment.warning @nospell
+ (#any-of? @comment.warning "HACK" "WARNING" "WARN" "FIX"))
((tag
- (name) @text.danger @nospell
+ (name) @comment.error @nospell
("(" @punctuation.bracket (user) @constant ")" @punctuation.bracket)?
":" @punctuation.delimiter)
- (#any-of? @text.danger "FIXME" "BUG" "ERROR"))
+ (#any-of? @comment.error "FIXME" "BUG" "ERROR"))
-("text" @text.danger @nospell
- (#any-of? @text.danger "FIXME" "BUG" "ERROR"))
+("text" @comment.error @nospell
+ (#any-of? @comment.error "FIXME" "BUG" "ERROR"))
; Issue number (#123)
("text" @number
(#lua-match? @number "^#[0-9]+$"))
-((uri) @text.uri @nospell)
+((uri) @string.special.url @nospell)
diff --git a/queries/commonlisp/highlights.scm b/queries/commonlisp/highlights.scm
index 55c0c8fc2..4c6501de6 100644
--- a/queries/commonlisp/highlights.scm
+++ b/queries/commonlisp/highlights.scm
@@ -10,14 +10,14 @@
(defun_header
function_name: (_) @function)
(defun_header
- lambda_list: (list_lit (sym_lit) @parameter))
+ lambda_list: (list_lit (sym_lit) @variable.parameter))
(defun_header
keyword: (defun_keyword "defmethod")
- lambda_list: (list_lit (list_lit . (sym_lit) . (sym_lit) @symbol)))
+ lambda_list: (list_lit (list_lit . (sym_lit) . (sym_lit) @string.special.symbol)))
(defun_header
- lambda_list: (list_lit (list_lit . (sym_lit) @parameter . (_))))
+ lambda_list: (list_lit (list_lit . (sym_lit) @variable.parameter . (_))))
(defun_header
- specifier: (sym_lit) @symbol)
+ specifier: (sym_lit) @string.special.symbol)
[":" "::" "."] @punctuation.special
@@ -51,14 +51,14 @@
] @function.macro
"=" @operator
-(include_reader_macro) @symbol
+(include_reader_macro) @string.special.symbol
["#C" "#c"] @number
-[(kwd_lit) (self_referential_reader_macro)] @symbol
+[(kwd_lit) (self_referential_reader_macro)] @string.special.symbol
(package_lit
- package: (_) @namespace)
-"cl" @namespace
+ package: (_) @module)
+"cl" @module
(str_lit) @string
@@ -119,10 +119,10 @@
(#lua-match? @constant "^[+].+[+]$"))
(var_quoting_lit
- marker: "#'" @symbol
- value: (_) @symbol)
+ marker: "#'" @string.special.symbol
+ value: (_) @string.special.symbol)
-["#" "#p" "#P"] @symbol
+["#" "#p" "#P"] @string.special.symbol
(list_lit
.
@@ -137,8 +137,8 @@
(#match? @operator "^([+*-+=<>]|<=|>=|/=)$"))
-((sym_lit) @symbol
-(#lua-match? @symbol "^[&]"))
+((sym_lit) @string.special.symbol
+(#lua-match? @string.special.symbol "^[&]"))
[(array_dimension) "#0A" "#0a"] @number
diff --git a/queries/cooklang/highlights.scm b/queries/cooklang/highlights.scm
index 4ced465bd..2ed9f2049 100644
--- a/queries/cooklang/highlights.scm
+++ b/queries/cooklang/highlights.scm
@@ -2,21 +2,21 @@
(ingredient
"@" @tag
- (name)? @text.title
+ (name)? @markup.heading
(amount
(quantity)? @number
(units)? @tag.attribute)?)
(timer
"~" @tag
- (name)? @text.title
+ (name)? @markup.heading
(amount
(quantity)? @number
(units)? @tag.attribute)?)
(cookware
"#" @tag
- (name)? @text.title
+ (name)? @markup.heading
(amount
(quantity)? @number
(units)? @tag.attribute)?)
diff --git a/queries/corn/highlights.scm b/queries/corn/highlights.scm
index 200c33e1b..18672fd04 100644
--- a/queries/corn/highlights.scm
+++ b/queries/corn/highlights.scm
@@ -15,6 +15,6 @@
(string) @string
(integer) @number
-(float) @float
+(float) @number.float
(boolean) @boolean
(null) @keyword
diff --git a/queries/cpon/highlights.scm b/queries/cpon/highlights.scm
index 36df3555c..370c48b1b 100644
--- a/queries/cpon/highlights.scm
+++ b/queries/cpon/highlights.scm
@@ -19,7 +19,7 @@
(number) @number
-(float) @float
+(float) @number.float
(boolean) @boolean
@@ -38,7 +38,7 @@
[ "<" ">" ] @punctuation.bracket
-(("\"" @conceal)
+(("\"" @string)
(#set! conceal ""))
; Comments
diff --git a/queries/cpp/highlights.scm b/queries/cpp/highlights.scm
index b9a8cfec0..4919a1b3f 100644
--- a/queries/cpp/highlights.scm
+++ b/queries/cpp/highlights.scm
@@ -1,33 +1,33 @@
; inherits: c
-((identifier) @field
- (#lua-match? @field "^m_.*$"))
+((identifier) @variable.member
+ (#lua-match? @variable.member "^m_.*$"))
(parameter_declaration
- declarator: (reference_declarator) @parameter)
+ declarator: (reference_declarator) @variable.parameter)
; function(Foo ...foo)
(variadic_parameter_declaration
declarator: (variadic_declarator
- (_) @parameter))
+ (_) @variable.parameter))
; int foo = 0
(optional_parameter_declaration
- declarator: (_) @parameter)
+ declarator: (_) @variable.parameter)
-;(field_expression) @parameter ;; How to highlight this?
+;(field_expression) @variable.parameter ;; How to highlight this?
(((field_expression
- (field_identifier) @method)) @_parent
+ (field_identifier) @function.method)) @_parent
(#has-parent? @_parent template_method function_declarator))
(field_declaration
- (field_identifier) @field)
+ (field_identifier) @variable.member)
(field_initializer
(field_identifier) @property)
(function_declarator
- declarator: (field_identifier) @method)
+ declarator: (field_identifier) @function.method)
(concept_definition
name: (identifier) @type.definition)
@@ -37,17 +37,17 @@
(auto) @type.builtin
-(namespace_identifier) @namespace
+(namespace_identifier) @module
((namespace_identifier) @type
(#lua-match? @type "^[%u]"))
(case_statement
value: (qualified_identifier (identifier) @constant))
-(using_declaration . "using" . "namespace" . [(qualified_identifier) (identifier)] @namespace)
+(using_declaration . "using" . "namespace" . [(qualified_identifier) (identifier)] @module)
(destructor_name
- (identifier) @method)
+ (identifier) @function.method)
; functions
(function_declarator
@@ -125,10 +125,10 @@
; methods
(function_declarator
(template_method
- (field_identifier) @method))
+ (field_identifier) @function.method))
(call_expression
(field_expression
- (field_identifier) @method.call))
+ (field_identifier) @function.method.call))
; constructors
@@ -176,7 +176,7 @@
"catch"
"noexcept"
"throw"
-] @exception
+] @keyword.exception
[
diff --git a/queries/css/highlights.scm b/queries/css/highlights.scm
index 383d6b7dc..8beba125f 100644
--- a/queries/css/highlights.scm
+++ b/queries/css/highlights.scm
@@ -9,7 +9,7 @@
(from)
] @keyword
-"@import" @include
+"@import" @keyword.import
(comment) @comment @spell
@@ -57,7 +57,7 @@
(attribute_name)
] @property
-(namespace_name) @namespace
+(namespace_name) @module
((property_name) @type.definition
(#lua-match? @type.definition "^[-][-]"))
diff --git a/queries/cuda/highlights.scm b/queries/cuda/highlights.scm
index 275871deb..0a90dbf67 100644
--- a/queries/cuda/highlights.scm
+++ b/queries/cuda/highlights.scm
@@ -8,6 +8,6 @@
"__global__"
"__forceinline__"
"__noinline__"
-] @storageclass
+] @keyword.storage
"__launch_bounds__" @type.qualifier
diff --git a/queries/cue/highlights.scm b/queries/cue/highlights.scm
index 00088dec9..47fd36311 100644
--- a/queries/cue/highlights.scm
+++ b/queries/cue/highlights.scm
@@ -3,18 +3,18 @@
[
"package"
"import"
-] @include
+] @keyword.import
; Namespaces
-(package_identifier) @namespace
+(package_identifier) @module
(import_spec ["." "_"] @punctuation.special)
[
(attr_path)
(package_path)
-] @text.uri ;; In attributes
+] @string.special.url ;; In attributes
; Attributes
@@ -22,13 +22,13 @@
; Conditionals
-"if" @conditional
+"if" @keyword.conditional
; Repeats
[
"for"
-] @repeat
+] @keyword.repeat
(for_clause "_" @punctuation.special)
@@ -69,7 +69,7 @@
(field
(label
- (identifier) @field))
+ (identifier) @variable.member))
(selector_expression
(_)
@@ -135,11 +135,11 @@
(number) @number
-(float) @float
+(float) @number.float
(si_unit
(float)
- (_) @symbol)
+ (_) @string.special.symbol)
(boolean) @boolean
diff --git a/queries/d/highlights.scm b/queries/d/highlights.scm
index 229a9bf55..18ced7246 100644
--- a/queries/d/highlights.scm
+++ b/queries/d/highlights.scm
@@ -59,7 +59,7 @@
(integer_literal) @number
-(float_literal) @float
+(float_literal) @number.float
[
"true"
@@ -88,12 +88,12 @@
(parameter
(var_declarator
- (identifier) @parameter
+ (identifier) @variable.parameter
)
)
(function_literal
- (identifier) @parameter
+ (identifier) @variable.parameter
)
(constructor
@@ -112,7 +112,7 @@
"else"
"if"
"switch"
-] @conditional
+] @keyword.conditional
[
"break"
@@ -122,7 +122,7 @@
"foreach"
"foreach_reverse"
"while"
-] @repeat
+] @keyword.repeat
[
"__parameters"
@@ -209,7 +209,7 @@
"finally"
"throw"
"try"
-] @exception
+] @keyword.exception
"null" @constant.builtin
@@ -218,7 +218,7 @@
"const"
"immutable"
"shared"
-] @storageclass
+] @keyword.storage
[
"abstract"
@@ -241,11 +241,11 @@
. (identifier) @type.definition)
(module_declaration
- "module" @include
+ "module" @keyword.import
)
(import_declaration
- "import" @include
+ "import" @keyword.import
)
(type) @type
@@ -272,8 +272,8 @@
(fundamental_type) @type.builtin
-(module_fully_qualified_name (packages (package_name) @namespace))
-(module_name) @namespace
+(module_fully_qualified_name (packages (package_name) @module))
+(module_name) @module
(at_attribute) @attribute
diff --git a/queries/dart/highlights.scm b/queries/dart/highlights.scm
index 3ebdae0ea..be2824da5 100644
--- a/queries/dart/highlights.scm
+++ b/queries/dart/highlights.scm
@@ -84,11 +84,11 @@
(scoped_identifier
scope: (identifier) @type)
(function_signature
- name: (identifier) @method)
+ name: (identifier) @function.method)
(getter_signature
- (identifier) @method)
+ (identifier) @function.method)
(setter_signature
- name: (identifier) @method)
+ name: (identifier) @function.method)
(enum_declaration
name: (identifier) @type)
(enum_constant
@@ -131,10 +131,10 @@
; Parameters
; --------------------
(formal_parameter
- name: (identifier) @parameter)
+ name: (identifier) @variable.parameter)
(named_argument
- (label (identifier) @parameter))
+ (label (identifier) @variable.parameter))
; Literals
; --------------------
@@ -147,7 +147,7 @@
; (hex_floating_point_literal)
] @number
-(symbol_literal) @symbol
+(symbol_literal) @string.special.symbol
(string_literal) @string
(true) @boolean
(false) @boolean
@@ -165,7 +165,7 @@
"as"
"show"
"hide"
-] @include
+] @keyword.import
; Reserved words (cannot be used as identifiers)
[
@@ -257,7 +257,7 @@
"static"
"typedef"))
-["if" "else" "switch" "default"] @conditional
+["if" "else" "switch" "default"] @keyword.conditional
[
"try"
@@ -265,6 +265,6 @@
"catch"
"finally"
(break_statement)
-] @exception
+] @keyword.exception
-["do" "while" "continue" "for"] @repeat
+["do" "while" "continue" "for"] @keyword.repeat
diff --git a/queries/devicetree/highlights.scm b/queries/devicetree/highlights.scm
index a7504260a..6236189bf 100644
--- a/queries/devicetree/highlights.scm
+++ b/queries/devicetree/highlights.scm
@@ -3,7 +3,7 @@
[
(preproc_include)
(dtsi_include)
-] @include
+] @keyword.import
(preproc_def) @constant.macro
(preproc_function_def) @function.macro
@@ -22,7 +22,7 @@
(integer_literal) @number
(identifier) @variable
-(node (identifier) @namespace)
+(node (identifier) @module)
(property (identifier) @property)
(labeled_item (identifier) @label)
(call_expression (identifier) @function.macro)
diff --git a/queries/dhall/highlights.scm b/queries/dhall/highlights.scm
index cd068efd0..5e2a77848 100644
--- a/queries/dhall/highlights.scm
+++ b/queries/dhall/highlights.scm
@@ -2,11 +2,11 @@
;; Imports
-(missing_import) @include
+(missing_import) @keyword.import
(local_import) @string.special.path
-(http_import) @string @text.uri
+(http_import) @string.special.url
[
(env_variable)
@@ -29,7 +29,7 @@
;; Parameters
-(lambda_expression label: (label) @parameter)
+(lambda_expression label: (label) @variable.parameter)
;; Variables
@@ -44,13 +44,13 @@
; Fields
-(record_literal_entry (label) @field)
+(record_literal_entry (label) @variable.member)
-(record_type_entry (label) @field)
+(record_type_entry (label) @variable.member)
(selector
(selector_dot)
- (_) @field)
+ (_) @variable.member)
;; Keywords
@@ -141,7 +141,7 @@
"if"
"then"
"else"
-] @conditional
+] @keyword.conditional
;; Literals
@@ -157,7 +157,7 @@
(natural_literal)
] @number
-(double_literal) @float
+(double_literal) @number.float
(boolean_literal) @boolean
diff --git a/queries/diff/highlights.scm b/queries/diff/highlights.scm
index 4b9cbad60..4288913d9 100644
--- a/queries/diff/highlights.scm
+++ b/queries/diff/highlights.scm
@@ -1,5 +1,5 @@
-[(addition) (new_file)] @text.diff.add
-[(deletion) (old_file)] @text.diff.delete
+[(addition) (new_file)] @diff.plus
+[(deletion) (old_file)] @diff.minus
(commit) @constant
(location) @attribute
diff --git a/queries/dot/highlights.scm b/queries/dot/highlights.scm
index 6916d3721..f204ce44c 100644
--- a/queries/dot/highlights.scm
+++ b/queries/dot/highlights.scm
@@ -33,12 +33,12 @@
(subgraph
id: (id
- (identifier) @namespace)
+ (identifier) @module)
)
(attribute
name: (id
- (identifier) @field)
+ (identifier) @variable.member)
)
(attribute
@@ -48,6 +48,6 @@
(comment) @comment
-(preproc) @preproc
+(preproc) @keyword.directive
(comment) @spell
diff --git a/queries/doxygen/highlights.scm b/queries/doxygen/highlights.scm
index 42d76a448..fadcdfa80 100644
--- a/queries/doxygen/highlights.scm
+++ b/queries/doxygen/highlights.scm
@@ -10,14 +10,14 @@
((tag
(tag_name) @_param
- (identifier) @parameter)
+ (identifier) @variable.parameter)
(#any-of? @_param "@param" "\\param"))
(function (identifier) @function)
(function_link) @function
-(emphasis) @text.emphasis
+(emphasis) @markup.italic
[
"\\a"
@@ -30,7 +30,7 @@
"in"
"out"
"inout"
-] @storageclass
+] @keyword.storage
"~" @operator
diff --git a/queries/dtd/highlights.scm b/queries/dtd/highlights.scm
index 678e61f92..fac7d923c 100644
--- a/queries/dtd/highlights.scm
+++ b/queries/dtd/highlights.scm
@@ -1,6 +1,6 @@
;; XML declaration
-(XMLDecl "xml" @preproc)
+(XMLDecl "xml" @keyword.directive)
(XMLDecl [ "version" "encoding" ] @tag.attribute)
@@ -10,12 +10,12 @@
;; Processing instructions
-(PI) @preproc
+(PI) @keyword.directive
;; Element declaration
(elementdecl
- "ELEMENT" @define
+ "ELEMENT" @keyword.directive.define
(Name) @tag)
(contentspec
@@ -30,7 +30,7 @@
;; Entity declaration
(GEDecl
- "ENTITY" @define
+ "ENTITY" @keyword.directive.define
(Name) @constant)
(GEDecl (EntityValue) @string)
@@ -42,7 +42,7 @@
;; Parsed entity declaration
(PEDecl
- "ENTITY" @define
+ "ENTITY" @keyword.directive.define
"%" @operator
(Name) @function.macro)
@@ -51,18 +51,18 @@
;; Notation declaration
(NotationDecl
- "NOTATION" @preproc
+ "NOTATION" @keyword.directive
(Name) @label)
((NotationDecl
(ExternalID
- (SystemLiteral (URI) @string.special))
+ (SystemLiteral (URI) @string.special.url))
(#set! "priority" 105)))
;; Attlist declaration
(AttlistDecl
- "ATTLIST" @define
+ "ATTLIST" @keyword.directive.define
(Name) @tag)
(AttDef (Name) @tag.attribute)
@@ -100,7 +100,7 @@
(PubidLiteral) @string.special
-(SystemLiteral (URI) @text.uri)
+(SystemLiteral (URI) @string.special.url)
;; Delimiters & punctuation
@@ -114,6 +114,6 @@
;; Misc
-[ "INCLUDE" "IGNORE" ] @include
+[ "INCLUDE" "IGNORE" ] @keyword.import
(Comment) @comment @spell
diff --git a/queries/ebnf/highlights.scm b/queries/ebnf/highlights.scm
index 00acf59e0..b0dfa2737 100644
--- a/queries/ebnf/highlights.scm
+++ b/queries/ebnf/highlights.scm
@@ -13,8 +13,8 @@
((identifier) @type
(#lua-match? @type "^%u"))
-((identifier) @symbol
- (#lua-match? @symbol "^%l"))
+((identifier) @string.special.symbol
+ (#lua-match? @string.special.symbol "^%l"))
((identifier) @constant
(#lua-match? @constant "^%u[%u%d_]+$"))
diff --git a/queries/ecma/highlights.scm b/queries/ecma/highlights.scm
index 664421701..b6fd64668 100644
--- a/queries/ecma/highlights.scm
+++ b/queries/ecma/highlights.scm
@@ -86,25 +86,25 @@
(generator_function_declaration
name: (identifier) @function)
(method_definition
- name: [(property_identifier) (private_property_identifier)] @method)
+ name: [(property_identifier) (private_property_identifier)] @function.method)
(method_definition
name: (property_identifier) @constructor
(#eq? @constructor "constructor"))
(pair
- key: (property_identifier) @method
+ key: (property_identifier) @function.method
value: (function))
(pair
- key: (property_identifier) @method
+ key: (property_identifier) @function.method
value: (arrow_function))
(assignment_expression
left: (member_expression
- property: (property_identifier) @method)
+ property: (property_identifier) @function.method)
right: (arrow_function))
(assignment_expression
left: (member_expression
- property: (property_identifier) @method)
+ property: (property_identifier) @function.method)
right: (function))
(variable_declarator
@@ -129,13 +129,13 @@
(call_expression
function: (member_expression
- property: [(property_identifier) (private_property_identifier)] @method.call))
+ property: [(property_identifier) (private_property_identifier)] @function.method.call))
; Builtins
;---------
-((identifier) @namespace.builtin
- (#eq? @namespace.builtin "Intl"))
+((identifier) @module.builtin
+ (#eq? @module.builtin "Intl"))
((identifier) @function.builtin
(#any-of? @function.builtin
@@ -159,7 +159,7 @@
; Variables
;----------
(namespace_import
- (identifier) @namespace)
+ (identifier) @module)
; Decorators
;----------
@@ -192,15 +192,15 @@
((comment) @comment.documentation
(#lua-match? @comment.documentation "^/[*][*][^*].*[*]/$"))
-(hash_bang_line) @preproc
+(hash_bang_line) @keyword.directive
-((string_fragment) @preproc
- (#eq? @preproc "use strict"))
+((string_fragment) @keyword.directive
+ (#eq? @keyword.directive "use strict"))
(string) @string
(template_string) @string
(escape_sequence) @string.escape
-(regex_pattern) @string.regex
+(regex_pattern) @string.regexp
(regex_flags) @character.special
(regex "/" @punctuation.bracket) ; Regex delimiters
@@ -266,7 +266,7 @@
] @operator
(binary_expression "/" @operator)
-(ternary_expression ["?" ":"] @conditional.ternary)
+(ternary_expression ["?" ":"] @keyword.conditional.ternary)
(unary_expression ["!" "~" "-" "+"] @operator)
(unary_expression ["delete" "void"] @keyword.operator)
@@ -289,17 +289,17 @@
"else"
"switch"
"case"
-] @conditional
+] @keyword.conditional
[
"import"
"from"
-] @include
+] @keyword.import
-(export_specifier "as" @include)
-(import_specifier "as" @include)
-(namespace_export "as" @include)
-(namespace_import "as" @include)
+(export_specifier "as" @keyword.import)
+(import_specifier "as" @keyword.import)
+(namespace_export "as" @keyword.import)
+(namespace_import "as" @keyword.import)
[
"for"
@@ -307,7 +307,7 @@
"do"
"while"
"continue"
-] @repeat
+] @keyword.repeat
[
"break"
@@ -352,9 +352,9 @@
"try"
"catch"
"finally"
-] @exception
+] @keyword.exception
(export_statement
"default" @keyword)
(switch_default
- "default" @conditional)
+ "default" @keyword.conditional)
diff --git a/queries/elixir/highlights.scm b/queries/elixir/highlights.scm
index 0fbde2959..5a9297fc7 100644
--- a/queries/elixir/highlights.scm
+++ b/queries/elixir/highlights.scm
@@ -40,7 +40,7 @@
(quoted_atom)
(keyword)
(quoted_keyword)
-] @symbol
+] @string.special.symbol
; Interpolation
(interpolation ["#{" "}"] @string.special)
@@ -52,7 +52,7 @@
(integer) @number
; Floats
-(float) @float
+(float) @number.float
; Characters
[
diff --git a/queries/elm/highlights.scm b/queries/elm/highlights.scm
index fbd3a4c3f..11bc0a00d 100644
--- a/queries/elm/highlights.scm
+++ b/queries/elm/highlights.scm
@@ -16,7 +16,7 @@
"else"
(case)
(of)
-] @conditional
+] @keyword.conditional
[
"let"
@@ -32,7 +32,7 @@
[
(import)
(exposing)
-] @include
+] @keyword.import
; Punctuation
@@ -79,14 +79,14 @@
(lower_case_identifier) @variable)
(value_qid
- ((dot) (lower_case_identifier) @field))
+ ((dot) (lower_case_identifier) @variable.member))
(field_access_expr
- ((dot) (lower_case_identifier) @field))
+ ((dot) (lower_case_identifier) @variable.member))
(function_declaration_left
- (anything_pattern (underscore) @parameter))
+ (anything_pattern (underscore) @variable.parameter))
(function_declaration_left
- (lower_pattern (lower_case_identifier) @parameter))
+ (lower_pattern (lower_case_identifier) @variable.parameter))
; Functions
@@ -136,13 +136,13 @@
;--------
(module_declaration
- (upper_case_qid (upper_case_identifier) @namespace))
+ (upper_case_qid (upper_case_identifier) @module))
(import_clause
- (upper_case_qid (upper_case_identifier) @namespace))
+ (upper_case_qid (upper_case_identifier) @module))
(as_clause
- (upper_case_identifier) @namespace)
+ (upper_case_identifier) @module)
(value_expr
- (value_qid (upper_case_identifier) @namespace))
+ (value_qid (upper_case_identifier) @module))
; Types
diff --git a/queries/elsa/highlights.scm b/queries/elsa/highlights.scm
index c787dadd8..8e52b6f5b 100644
--- a/queries/elsa/highlights.scm
+++ b/queries/elsa/highlights.scm
@@ -11,11 +11,11 @@
; Method
-(method) @method
+(method) @function.method
; Parameter
-(parameter) @parameter
+(parameter) @variable.parameter
; Variables
diff --git a/queries/elvish/highlights.scm b/queries/elvish/highlights.scm
index 886f5bcda..d6243549f 100644
--- a/queries/elvish/highlights.scm
+++ b/queries/elvish/highlights.scm
@@ -1,21 +1,21 @@
(comment) @comment @spell
-["if" "elif"] @conditional
-(if (else "else" @conditional))
+["if" "elif"] @keyword.conditional
+(if (else "else" @keyword.conditional))
-["while" "for"] @repeat
-(while (else "else" @repeat))
-(for (else "else" @repeat))
+["while" "for"] @keyword.repeat
+(while (else "else" @keyword.repeat))
+(for (else "else" @keyword.repeat))
-["try" "catch" "finally"] @exception
-(try (else "else" @exception))
+["try" "catch" "finally"] @keyword.exception
+(try (else "else" @keyword.exception))
-"use" @include
-(import (bareword) @string.special)
+"use" @keyword.import
+(import (bareword) @string.special.path)
(wildcard ["*" "**" "?"] @character.special)
-(command argument: (bareword) @parameter)
+(command argument: (bareword) @variable.parameter)
(command head: (identifier) @function.call)
((command head: (identifier) @keyword.return)
(#eq? @keyword.return "return"))
@@ -34,7 +34,7 @@
"fn" @keyword.function
(identifier) @function)
-(parameter_list) @parameter
+(parameter_list) @variable.parameter
(parameter_list "|" @punctuation.bracket)
["var" "set" "tmp" "del"] @keyword
diff --git a/queries/erlang/highlights.scm b/queries/erlang/highlights.scm
index 0c129e23f..da0d1e600 100644
--- a/queries/erlang/highlights.scm
+++ b/queries/erlang/highlights.scm
@@ -3,7 +3,7 @@
(char) @character
(integer) @number
-(float) @float
+(float) @number.float
(comment) @comment @spell
@@ -70,12 +70,12 @@
"end"
"maybe"
"else"
-] @conditional
+] @keyword.conditional
[
"catch"
"try"
-] @exception
+] @keyword.exception
((atom) @boolean (#any-of? @boolean "true" "false"))
@@ -86,26 +86,26 @@
(pp_define
lhs: _ @constant.macro (#set! "priority" 101)
)
-(_preprocessor_directive) @preproc (#set! "priority" 99)
+(_preprocessor_directive) @keyword.directive (#set! "priority" 99)
;; Attributes
-(pp_include) @include
-(pp_include_lib) @include
-(export_attribute) @include
+(pp_include) @keyword.import
+(pp_include_lib) @keyword.import
+(export_attribute) @keyword.import
(export_type_attribute) @type.definition
(export_type_attribute types: (fa fun: _ @type (#set! "priority" 101)))
-(behaviour_attribute) @include
-(module_attribute (atom) @namespace) @include
+(behaviour_attribute) @keyword.import
+(module_attribute (atom) @module) @keyword.import
(wild_attribute name: (attr_name name: _ @attribute)) @attribute
;; Records
(record_expr) @type
-(record_field_expr _ @field) @type
-(record_field_name _ @field) @type
+(record_field_expr _ @variable.member) @type
+(record_field_name _ @variable.member) @type
(record_name "#" @type name: _ @type) @type
(record_decl name: _ @type) @type.definition
-(record_field name: _ @field)
-(record_field name: _ @field ty: _ @type)
+(record_field name: _ @variable.member)
+(record_field name: _ @variable.member ty: _ @type)
;; Type alias
(type_alias name: _ @type) @type.definition
@@ -115,7 +115,7 @@
;;; expr_function_call
(call expr: [(atom) (remote) (var)] @function)
-(call (atom) @exception (#any-of? @exception "error" "throw" "exit"))
+(call (atom) @keyword.exception (#any-of? @keyword.exception "error" "throw" "exit"))
;;; Parenthesized expression: (SomeFunc)(), only highlight the parens
(call
diff --git a/queries/facility/highlights.scm b/queries/facility/highlights.scm
index c10ff49be..060ccd05c 100644
--- a/queries/facility/highlights.scm
+++ b/queries/facility/highlights.scm
@@ -75,7 +75,7 @@
name: (identifier) @variable)
(method
- name: (identifier) @method)
+ name: (identifier) @function.method)
(number_literal) @number
(string_literal) @string
diff --git a/queries/fennel/highlights.scm b/queries/fennel/highlights.scm
index 14c91d976..620c42ef3 100644
--- a/queries/fennel/highlights.scm
+++ b/queries/fennel/highlights.scm
@@ -30,11 +30,11 @@
(multi_symbol
"." @punctuation.delimiter
- (symbol) @field)
+ (symbol) @variable.member)
(multi_symbol_method
":" @punctuation.delimiter
- (symbol) @method.call .)
+ (symbol) @function.method.call .)
(list . (symbol) @function.call)
(list . (multi_symbol (symbol) @function.call .))
@@ -42,7 +42,7 @@
((symbol) @variable.builtin
(#lua-match? @variable.builtin "^[$]"))
-(binding) @symbol
+(binding) @string.special.symbol
[
"fn"
@@ -64,16 +64,16 @@
[
"for"
"each"
-] @repeat
-((symbol) @repeat
- (#any-of? @repeat
+] @keyword.repeat
+((symbol) @keyword.repeat
+ (#any-of? @keyword.repeat
"while"))
[
"match"
-] @conditional
-((symbol) @conditional
- (#any-of? @conditional
+] @keyword.conditional
+((symbol) @keyword.conditional
+ (#any-of? @keyword.conditional
"if" "when"))
[
@@ -89,8 +89,8 @@
(#any-of? @keyword
"comment" "do" "doc" "eval-compiler" "lua" "macros" "quote" "tset" "values"))
-((symbol) @include
- (#any-of? @include
+((symbol) @keyword.import
+ (#any-of? @keyword.import
"require" "require-macros" "import-macros" "include"))
[
diff --git a/queries/firrtl/highlights.scm b/queries/firrtl/highlights.scm
index ace8f712e..5f165eb32 100644
--- a/queries/firrtl/highlights.scm
+++ b/queries/firrtl/highlights.scm
@@ -1,8 +1,8 @@
; Namespaces
-(circuit (identifier) @namespace)
+(circuit (identifier) @module)
-(module (identifier) @namespace)
+(module (identifier) @module)
; Types
@@ -52,14 +52,14 @@
[
"input"
"output"
-] @storageclass
+] @keyword.storage
; Conditionals
[
"when"
"else"
-] @conditional
+] @keyword.conditional
; Annotations
@@ -99,31 +99,31 @@
"reader"
"writer"
"readwriter"
-] @field.builtin
+] @variable.member.builtin
-((field_id) @field
+((field_id) @variable.member
(#set! "priority" 105))
-(port (identifier) @field)
+(port (identifier) @variable.member)
-(wire (identifier) @field)
+(wire (identifier) @variable.member)
-(cmem (identifier) @field)
+(cmem (identifier) @variable.member)
-(smem (identifier) @field)
+(smem (identifier) @variable.member)
-(memory (identifier) @field)
+(memory (identifier) @variable.member)
-(register (identifier) @field)
+(register (identifier) @variable.member)
; Parameters
-(primitive_operation (identifier) @parameter)
+(primitive_operation (identifier) @variable.parameter)
-(mux (identifier) @parameter)
-(printf (identifier) @parameter)
-(reset (identifier) @parameter)
-(stop (identifier) @parameter)
+(mux (identifier) @variable.parameter)
+(printf (identifier) @variable.parameter)
+(reset (identifier) @variable.parameter)
+(stop (identifier) @variable.parameter)
; Variables
@@ -151,7 +151,7 @@
(number_str) @string.special
-(double) @float
+(double) @number.float
(string) @string
diff --git a/queries/fish/highlights.scm b/queries/fish/highlights.scm
index 8d0fba29a..28ddf0b98 100644
--- a/queries/fish/highlights.scm
+++ b/queries/fish/highlights.scm
@@ -35,29 +35,29 @@
[
"if"
"end"
-] @conditional)
+] @keyword.conditional)
(switch_statement
[
"switch"
"end"
-] @conditional)
+] @keyword.conditional)
(case_clause
[
"case"
-] @conditional)
+] @keyword.conditional)
(else_clause
[
"else"
-] @conditional)
+] @keyword.conditional)
(else_if_clause
[
"else"
"if"
-] @conditional)
+] @keyword.conditional)
;; Loops/Blocks
@@ -65,19 +65,19 @@
[
"while"
"end"
-] @repeat)
+] @keyword.repeat)
(for_statement
[
"for"
"end"
-] @repeat)
+] @keyword.repeat)
(begin_statement
[
"begin"
"end"
-] @repeat)
+] @keyword.repeat)
;; Keywords
@@ -106,7 +106,7 @@
(command
argument: [
- (word) @parameter (#lua-match? @parameter "^[-]")
+ (word) @variable.parameter (#lua-match? @variable.parameter "^[-]")
]
)
@@ -137,7 +137,7 @@
option: [
(word)
(concatenation (word))
- ] @parameter (#lua-match? @parameter "^[-]")
+ ] @variable.parameter (#lua-match? @variable.parameter "^[-]")
)
;; Strings
@@ -159,5 +159,5 @@
((word) @boolean
(#any-of? @boolean "true" "false"))
-((program . (comment) @preproc)
- (#lua-match? @preproc "^#!/"))
+((program . (comment) @keyword.directive)
+ (#lua-match? @keyword.directive "^#!/"))
diff --git a/queries/foam/highlights.scm b/queries/foam/highlights.scm
index aba33b4e8..33370df66 100644
--- a/queries/foam/highlights.scm
+++ b/queries/foam/highlights.scm
@@ -11,32 +11,32 @@
;; Macros
(macro
- "$" @conditional
- (prev_scope)* @conditional
- (identifier)* @namespace
+ "$" @keyword.conditional
+ (prev_scope)* @keyword.conditional
+ (identifier)* @module
)
;; Directives
-"#" @conditional
+"#" @keyword.conditional
(preproc_call
- directive: (identifier)* @conditional
- argument: (identifier)* @namespace
+ directive: (identifier)* @keyword.conditional
+ argument: (identifier)* @module
)
((preproc_call
- argument: (identifier)* @namespace) @conditional
- (#eq? @conditional "ifeq"))
-((preproc_call) @conditional
- (#any-of? @conditional "else" "endif"))
+ argument: (identifier)* @module) @keyword.conditional
+ (#eq? @keyword.conditional "ifeq"))
+((preproc_call) @keyword.conditional
+ (#any-of? @keyword.conditional "else" "endif"))
;; Literals
-(number_literal) @float
+(number_literal) @number.float
(string_literal) @string
(escape_sequence) @string.escape
(boolean) @boolean
;; Treat [m^2 s^-2] the same as if it was put in numbers format
-(dimensions dimension: (identifier) @float)
+(dimensions dimension: (identifier) @number.float)
;; Punctuation
[
diff --git a/queries/fortran/highlights.scm b/queries/fortran/highlights.scm
index 3e85212bd..c2eaa6a7e 100644
--- a/queries/fortran/highlights.scm
+++ b/queries/fortran/highlights.scm
@@ -1,26 +1,26 @@
; Preprocs
-(preproc_file_line) @preproc
+(preproc_file_line) @keyword.directive
; Namespaces
(program_statement
- (name) @namespace)
+ (name) @module)
(end_program_statement
- (name) @namespace)
+ (name) @module)
(module_statement
- (name) @namespace)
+ (name) @module)
(end_module_statement
- (name) @namespace)
+ (name) @module)
(submodule_statement
- (name) @namespace)
+ (name) @module)
(end_submodule_statement
- (name) @namespace)
+ (name) @module)
; Includes
@@ -28,7 +28,7 @@
"import"
"include"
"use"
-] @include
+] @keyword.import
(import_statement
","
@@ -147,7 +147,7 @@
"in"
"inout"
"out"
-] @storageclass
+] @keyword.storage
; Labels
@@ -211,7 +211,7 @@
[
"error"
-] @exception
+] @keyword.exception
; Conditionals
@@ -224,7 +224,7 @@
"if"
"then"
"where"
-] @conditional
+] @keyword.conditional
; Repeats
@@ -238,7 +238,7 @@
"continue"
"cycle"
"exit"
-] @repeat
+] @keyword.repeat
; Variables
@@ -247,10 +247,10 @@
; Parameters
(keyword_argument
- name: (identifier) @parameter)
+ name: (identifier) @variable.parameter)
(parameters
- (identifier) @parameter)
+ (identifier) @variable.parameter)
; Properties
diff --git a/queries/fsh/highlights.scm b/queries/fsh/highlights.scm
index e4c0edd8e..9a11e279f 100644
--- a/queries/fsh/highlights.scm
+++ b/queries/fsh/highlights.scm
@@ -85,7 +85,7 @@
(flag) @constant
; Special Params
-(code_value) @parameter
+(code_value) @variable.parameter
; Extras
(fsh_comment) @comment @spell
diff --git a/queries/func/highlights.scm b/queries/func/highlights.scm
index c1662a180..b5b6dde35 100644
--- a/queries/func/highlights.scm
+++ b/queries/func/highlights.scm
@@ -1,20 +1,20 @@
; Include
-"#include" @include
+"#include" @keyword.import
(include_path) @string
; Preproc
[
"#pragma"
-] @preproc
+] @keyword.directive
(pragma_directive
[
"version"
"not-version"
"test-version-set"
- ] @preproc)
+ ] @keyword.directive)
; Keywords
@@ -40,14 +40,14 @@
"elseif"
"elseifnot"
"until"
-] @conditional
+] @keyword.conditional
; Exceptions
[
"try"
"catch"
-] @exception
+] @keyword.exception
; Repeats
@@ -56,7 +56,7 @@
"forall"
"repeat"
"while"
-] @repeat
+] @keyword.repeat
; Qualifiers
[
@@ -83,11 +83,11 @@
function: (identifier) @function)
(method_call
- method_name: (identifier) @method.call)
+ method_name: (identifier) @function.method.call)
; Parameters
-(parameter) @parameter
+(parameter) @variable.parameter
; Types
diff --git a/queries/fusion/highlights.scm b/queries/fusion/highlights.scm
index 81f471f68..e8c217e67 100644
--- a/queries/fusion/highlights.scm
+++ b/queries/fusion/highlights.scm
@@ -12,7 +12,7 @@
(afx_attribute
(afx_property_identifier) @tag.attribute)
-(afx_text) @text
+(afx_text) @spell
; identifiers eel
@@ -43,13 +43,13 @@
(include_statement
[
"include"
- ] @include
- (source_file) @text.uri
+ ] @keyword.import
+ (source_file) @string.special.url
)
(namespace_declaration
"namespace" @keyword
- (alias_namespace) @namespace)
+ (alias_namespace) @module)
(type
name: (type_name) @type)
@@ -78,7 +78,7 @@
[
(package_name)
(alias_namespace)
-] @namespace
+] @module
(namespace_declaration "=" @operator)
(assignment "=" @operator)
@@ -117,4 +117,4 @@
] @punctuation.delimiter
(eel_ternary_expression
- ["?" ":"] @conditional.ternary)
+ ["?" ":"] @keyword.conditional.ternary)
diff --git a/queries/gdscript/highlights.scm b/queries/gdscript/highlights.scm
index 535dcd009..1b4edbc7e 100644
--- a/queries/gdscript/highlights.scm
+++ b/queries/gdscript/highlights.scm
@@ -6,7 +6,7 @@
(comment) @comment @spell
(string_name) @string
(string) @string
-(float) @float
+(float) @number.float
(integer) @number
(null) @constant
(setter) @function
@@ -15,14 +15,14 @@
(get_body "get" @keyword.function)
(static_keyword) @type.qualifier
(tool_statement) @keyword
-(breakpoint_statement) @debug
+(breakpoint_statement) @keyword.debug
(inferred_type) @operator
[(true) (false)] @boolean
[
(get_node)
(node_path)
-] @text.uri
+] @string.special.url
(class_name_statement
(name) @type) @keyword
@@ -44,14 +44,14 @@
(function_definition
(name) @function (parameters
- (identifier) @parameter)*)
+ (identifier) @variable.parameter)*)
-(typed_parameter (identifier) @parameter)
-(default_parameter (identifier) @parameter)
+(typed_parameter (identifier) @variable.parameter)
+(default_parameter (identifier) @variable.parameter)
(call (identifier) @function.call)
-(call (identifier) @include
- (#any-of? @include "preload" "load"))
+(call (identifier) @keyword.import
+ (#any-of? @keyword.import "preload" "load"))
;; Properties and Methods
@@ -63,9 +63,9 @@
; Same question but for methods?
(class_definition
- (body (function_definition (name) @method)))
+ (body (function_definition (name) @function.method)))
-(attribute_call (identifier) @method.call)
+(attribute_call (identifier) @function.method.call)
(attribute (_) (identifier) @property)
;; Enums
@@ -90,9 +90,9 @@
["," "." ":"] @punctuation.delimiter
-["if" "elif" "else" "match"] @conditional
+["if" "elif" "else" "match"] @keyword.conditional
-["for" "while" "break" "continue"] @repeat
+["for" "while" "break" "continue"] @keyword.repeat
[
"~"
diff --git a/queries/git_config/highlights.scm b/queries/git_config/highlights.scm
index 18b75bc64..df1dde803 100644
--- a/queries/git_config/highlights.scm
+++ b/queries/git_config/highlights.scm
@@ -2,13 +2,13 @@
(section_name) @type
-((section_name) @include
- (#eq? @include "include"))
+((section_name) @keyword.import
+ (#eq? @keyword.import "include"))
((section_header
- (section_name) @include
+ (section_name) @keyword.import
(subsection_name))
- (#eq? @include "includeIf"))
+ (#eq? @keyword.import "includeIf"))
(variable (name) @property)
@@ -28,11 +28,11 @@
(string) @string
-((string) @text.uri
- (#lua-match? @text.uri "^[.]?[/]"))
+((string) @string.special.path
+ (#lua-match? @string.special.path "^[.]?[/]"))
-((string) @text.uri
- (#lua-match? @text.uri "^[~]"))
+((string) @string.special.path
+ (#lua-match? @string.special.path "^[~]"))
(section_header
[
diff --git a/queries/git_rebase/highlights.scm b/queries/git_rebase/highlights.scm
index 466bd2f16..9ace6be26 100644
--- a/queries/git_rebase/highlights.scm
+++ b/queries/git_rebase/highlights.scm
@@ -1,6 +1,6 @@
((command) @keyword
(label)? @constant
- (message)? @text @spell)
+ (message)? @none @spell)
(option) @operator
diff --git a/queries/gitattributes/highlights.scm b/queries/gitattributes/highlights.scm
index 5d044b356..9f3c03dfb 100644
--- a/queries/gitattributes/highlights.scm
+++ b/queries/gitattributes/highlights.scm
@@ -22,7 +22,7 @@
] @string.escape
(attribute
- (attr_name) @parameter)
+ (attr_name) @variable.parameter)
(attribute
(builtin_attr) @variable.builtin)
@@ -37,15 +37,16 @@
(string_value) @string
-(macro_tag) @preproc
+(macro_tag) @keyword.directive
(macro_def
macro_name: (_) @property)
-[
- (pattern_negation)
- (redundant_escape)
- (trailing_slash)
-] @error
+; we do not lint syntax errors
+; [
+; (pattern_negation)
+; (redundant_escape)
+; (trailing_slash)
+; ] @error
(comment) @comment @spell
diff --git a/queries/gitcommit/highlights.scm b/queries/gitcommit/highlights.scm
index 9c70e19b5..d475021c2 100644
--- a/queries/gitcommit/highlights.scm
+++ b/queries/gitcommit/highlights.scm
@@ -1,17 +1,17 @@
(comment) @comment
(generated_comment) @comment
-(title) @text.title
-(text) @text
-(branch) @text.reference
+(title) @markup.heading
+; (text) @none
+(branch) @markup.link
(change) @keyword
-(filepath) @text.uri
+(filepath) @string.special.url
(arrow) @punctuation.delimiter
-(subject) @text.title @spell
-(subject (overflow) @text @spell)
+(subject) @markup.heading @spell
+(subject (overflow) @none @spell)
(subject (subject_prefix) @function @nospell)
(prefix (type) @keyword @nospell)
-(prefix (scope) @parameter @nospell)
+(prefix (scope) @variable.parameter @nospell)
(prefix [
"("
")"
@@ -21,12 +21,12 @@
"!"
] @punctuation.special)
-(message) @text @spell
+(message) @spell
(trailer (token) @label)
-(trailer (value) @text)
+; (trailer (value) @none)
-(breaking_change (token) @text.warning)
-(breaking_change (value) @text @spell)
+(breaking_change (token) @comment.warning)
+(breaking_change (value) @none @spell)
(scissor) @comment
diff --git a/queries/gleam/highlights.scm b/queries/gleam/highlights.scm
index bc392dec4..f74f17ab7 100644
--- a/queries/gleam/highlights.scm
+++ b/queries/gleam/highlights.scm
@@ -16,18 +16,18 @@
; Imports
[
"import"
-] @include
+] @keyword.import
; Conditionals
[
"case"
"if"
-] @conditional
+] @keyword.conditional
; Exceptions
[
"assert"
-] @exception
+] @keyword.exception
; Punctuation
[
@@ -99,9 +99,9 @@
] @comment
; Modules & Imports
-(module) @namespace
-(import alias: ((identifier) @namespace)?)
-(remote_type_identifier module: (identifier) @namespace)
+(module) @module
+(import alias: ((identifier) @module)?)
+(remote_type_identifier module: (identifier) @module)
(unqualified_import name: (identifier) @function)
; Strings
@@ -113,11 +113,11 @@
; Numbers
(integer) @number
-(float) @float
+(float) @number.float
; Function Parameter Labels
(function_call arguments: (arguments (argument label: (label) @label)))
-(function_parameter label: (label)? @label name: (identifier) @parameter)
+(function_parameter label: (label)? @label name: (identifier) @variable.parameter)
; Records
(record arguments: (arguments (argument label: (label) @property)?))
@@ -154,7 +154,7 @@
; External Functions
(external_function name: (identifier) @function)
-(external_function_body (string) @namespace . (string) @function)
+(external_function_body (string) @module . (string) @function)
; Constructors
(constructor_name) @type @constructor
diff --git a/queries/glimmer/highlights.scm b/queries/glimmer/highlights.scm
index a577ba425..059a1069c 100644
--- a/queries/glimmer/highlights.scm
+++ b/queries/glimmer/highlights.scm
@@ -23,10 +23,10 @@
(block_statement_end) @tag.delimiter
; Highlight `if`/`each`/`let`
-(block_statement_start path: (identifier) @conditional)
-(block_statement_end path: (identifier) @conditional)
-((mustache_statement (identifier) @conditional)
- (#lua-match? @conditional "else"))
+(block_statement_start path: (identifier) @keyword.conditional)
+(block_statement_end path: (identifier) @keyword.conditional)
+((mustache_statement (identifier) @keyword.conditional)
+ (#lua-match? @keyword.conditional "else"))
; == Mustache Statements ===
@@ -66,8 +66,8 @@
(identifier) @function
])
(#not-any-of? @function "if" "yield"))
-((helper_invocation helper: (identifier) @conditional)
- (#eq? @conditional "if"))
+((helper_invocation helper: (identifier) @keyword.conditional)
+ (#eq? @keyword.conditional "if"))
((helper_invocation helper: (identifier) @keyword)
(#eq? @keyword "yield"))
diff --git a/queries/glsl/highlights.scm b/queries/glsl/highlights.scm
index b23ad797b..5825673c1 100644
--- a/queries/glsl/highlights.scm
+++ b/queries/glsl/highlights.scm
@@ -29,7 +29,7 @@
"subroutine" @keyword.function
-(extension_storage_class) @storageclass
+(extension_storage_class) @keyword.storage
((identifier) @variable.builtin
(#lua-match? @variable.builtin "^gl_"))
diff --git a/queries/gn/highlights.scm b/queries/gn/highlights.scm
index 87082a30a..3b09a7753 100644
--- a/queries/gn/highlights.scm
+++ b/queries/gn/highlights.scm
@@ -1,17 +1,17 @@
; Includes
-"import" @include
+"import" @keyword.import
; Conditionals
[
"if"
"else"
-] @conditional
+] @keyword.conditional
; Repeats
-"foreach" @repeat
+"foreach" @keyword.repeat
; Operators
@@ -42,7 +42,7 @@
; Fields
-(scope_access field: (identifier) @field)
+(scope_access field: (identifier) @variable.member)
; Literals
diff --git a/queries/go/highlights.scm b/queries/go/highlights.scm
index 65c00ea27..9c6fe1be8 100644
--- a/queries/go/highlights.scm
+++ b/queries/go/highlights.scm
@@ -8,10 +8,10 @@
(type_spec name: (type_identifier) @type.definition)
(field_identifier) @property
(identifier) @variable
-(package_identifier) @namespace
+(package_identifier) @module
-(parameter_declaration (identifier) @parameter)
-(variadic_parameter_declaration (identifier) @parameter)
+(parameter_declaration (identifier) @variable.parameter)
+(variadic_parameter_declaration (identifier) @variable.parameter)
(label_name) @label
@@ -25,7 +25,7 @@
(call_expression
function: (selector_expression
- field: (field_identifier) @method.call))
+ field: (field_identifier) @function.method.call))
; Function definitions
@@ -33,10 +33,10 @@
name: (identifier) @function)
(method_declaration
- name: (field_identifier) @method)
+ name: (field_identifier) @function.method)
(method_spec
- name: (field_identifier) @method)
+ name: (field_identifier) @function.method)
; Constructors
@@ -112,19 +112,19 @@
"return" @keyword.return
"go" @keyword.coroutine
-"for" @repeat
+"for" @keyword.repeat
[
"import"
"package"
-] @include
+] @keyword.import
[
"else"
"case"
"switch"
"if"
- ] @conditional
+ ] @keyword.conditional
;; Builtin types
@@ -204,7 +204,7 @@
(escape_sequence) @string.escape
(int_literal) @number
-(float_literal) @float
+(float_literal) @number.float
(imaginary_literal) @number
[
@@ -218,8 +218,8 @@
] @constant.builtin
(keyed_element
- . (literal_element (identifier) @field))
-(field_declaration name: (field_identifier) @field)
+ . (literal_element (identifier) @variable.member))
+(field_declaration name: (field_identifier) @variable.member)
; Comments
diff --git a/queries/go/locals.scm b/queries/go/locals.scm
index 37d72b2be..5702a2b93 100644
--- a/queries/go/locals.scm
+++ b/queries/go/locals.scm
@@ -5,7 +5,7 @@
(
(method_declaration
- name: (field_identifier) @local.definition.method); @method
+ name: (field_identifier) @local.definition.method); @function.method
)
(short_var_declaration
diff --git a/queries/godot_resource/highlights.scm b/queries/godot_resource/highlights.scm
index 848fbbe1f..f87f228d9 100644
--- a/queries/godot_resource/highlights.scm
+++ b/queries/godot_resource/highlights.scm
@@ -6,7 +6,7 @@
(string) @string
(integer) @number
-(float) @float
+(float) @number.float
(true) @constant.builtin
(false) @constant.builtin
diff --git a/queries/gomod/highlights.scm b/queries/gomod/highlights.scm
index 76a2a4523..8e3906fc1 100644
--- a/queries/gomod/highlights.scm
+++ b/queries/gomod/highlights.scm
@@ -11,7 +11,7 @@
"=>" @operator
(comment) @comment @spell
-(module_path) @text.uri
+(module_path) @string.special.url
[
(version)
diff --git a/queries/gosum/highlights.scm b/queries/gosum/highlights.scm
index bb65bd71f..bd9595b2b 100644
--- a/queries/gosum/highlights.scm
+++ b/queries/gosum/highlights.scm
@@ -8,11 +8,11 @@
] @keyword
-(module_path) @string @text.uri
+(module_path) @string.special.url
(module_version) @string.special
(hash_version) @attribute
-(hash) @symbol
+(hash) @string.special.symbol
[
(number)
diff --git a/queries/gpg/highlights.scm b/queries/gpg/highlights.scm
index fb70ba135..1dac05562 100644
--- a/queries/gpg/highlights.scm
+++ b/queries/gpg/highlights.scm
@@ -1,8 +1,8 @@
(option . _ @keyword)
(option
- ("no-" @parameter)?
- (name) @parameter)
+ ("no-" @variable.parameter)?
+ (name) @variable.parameter)
(string (content) @string)
@@ -11,7 +11,7 @@
"clear"
] @string.special
-(url) @text.uri
+(url) @string.special.url
(key) @constant
@@ -25,9 +25,9 @@
"sensitive:" @type.qualifier
-(filter_name) @parameter
+(filter_name) @variable.parameter
-(filter_scope) @namespace
+(filter_scope) @module
(filter_property) @property
diff --git a/queries/graphql/highlights.scm b/queries/graphql/highlights.scm
index 48f27f983..136f287ee 100644
--- a/queries/graphql/highlights.scm
+++ b/queries/graphql/highlights.scm
@@ -80,17 +80,17 @@
(input_fields_definition
(input_value_definition
- (name) @parameter))
+ (name) @variable.parameter))
(argument
- (name) @parameter)
+ (name) @variable.parameter)
(arguments_definition
(input_value_definition
- (name) @parameter))
+ (name) @variable.parameter))
(variable_definition
- (variable) @parameter)
+ (variable) @variable.parameter)
(argument
(value
@@ -103,7 +103,7 @@
(int_value) @number
-(float_value) @float
+(float_value) @number.float
(boolean_value) @boolean
diff --git a/queries/groovy/highlights.scm b/queries/groovy/highlights.scm
index a9b38ef5b..25dcdb8ca 100644
--- a/queries/groovy/highlights.scm
+++ b/queries/groovy/highlights.scm
@@ -7,7 +7,7 @@
(block
(unit
- (identifier) @namespace))
+ (identifier) @module))
(func
(identifier) @function)
@@ -64,8 +64,8 @@
"private"
"public"))
-((identifier) @exception
- (#any-of? @exception
+((identifier) @keyword.exception
+ (#any-of? @keyword.exception
"throw"
"finally"
"try"
diff --git a/queries/gstlaunch/highlights.scm b/queries/gstlaunch/highlights.scm
index 8fc8d2198..36118712e 100644
--- a/queries/gstlaunch/highlights.scm
+++ b/queries/gstlaunch/highlights.scm
@@ -16,7 +16,7 @@
] @punctuation.bracket
(property
- key: (identifier) @field)
+ key: (identifier) @variable.member)
(value) @string
(string_literal) @string
(cap
diff --git a/queries/hack/highlights.scm b/queries/hack/highlights.scm
index efe5631a6..91efe90b4 100644
--- a/queries/hack/highlights.scm
+++ b/queries/hack/highlights.scm
@@ -43,7 +43,7 @@
"include_once"
"require"
"require_once"
-] @include
+] @keyword.import
[
"new"
@@ -184,10 +184,10 @@
] @operator
(integer) @number
-(float) @float
+(float) @number.float
(parameter
- (variable) @parameter)
+ (variable) @variable.parameter)
(call_expression
function: (qualified_identifier (identifier) @function.call .))
@@ -197,23 +197,23 @@
(call_expression
function: (selection_expression
- (qualified_identifier (identifier) @method.call .)))
+ (qualified_identifier (identifier) @function.method.call .)))
(qualified_identifier
- (_) @namespace .
+ (_) @module .
(_))
(use_statement
(qualified_identifier
- (_) @namespace .)
+ (_) @module .)
(use_clause))
(use_statement
(use_type "namespace")
(use_clause
(qualified_identifier
- (identifier) @namespace .)
- alias: (identifier)? @namespace))
+ (identifier) @module .)
+ alias: (identifier)? @module))
(use_statement
(use_type "const")
@@ -239,8 +239,8 @@
(use_clause
(use_type "namespace")
(qualified_identifier
- (_) @namespace .)
- alias: (identifier)? @namespace)
+ (_) @module .)
+ alias: (identifier)? @module)
(use_clause
(use_type "function")
@@ -263,7 +263,7 @@
(function_declaration
name: (identifier) @function)
(method_declaration
- name: (identifier) @method)
+ name: (identifier) @function.method)
(type_arguments
[ "<" ">" ] @punctuation.bracket)
@@ -279,7 +279,7 @@
"\\" @punctuation.delimiter)
(ternary_expression
- ["?" ":"] @conditional.ternary)
+ ["?" ":"] @keyword.conditional.ternary)
[
"if"
@@ -287,13 +287,13 @@
"elseif"
"switch"
"case"
-] @conditional
+] @keyword.conditional
[
"try"
"catch"
"finally"
-] @exception
+] @keyword.exception
[
"for"
@@ -302,7 +302,7 @@
"do"
"continue"
"break"
-] @repeat
+] @keyword.repeat
[
(string)
diff --git a/queries/hare/highlights.scm b/queries/hare/highlights.scm
index f331da910..fb9f3f158 100644
--- a/queries/hare/highlights.scm
+++ b/queries/hare/highlights.scm
@@ -23,18 +23,18 @@
[
"use"
-] @include
+] @keyword.import
(use_statement
(scoped_type_identifier
- (identifier) @namespace))
+ (identifier) @module))
(use_statement
- (identifier) @namespace "{")
+ (identifier) @module "{")
(use_statement
- . (identifier) @namespace .)
+ . (identifier) @module .)
((scoped_type_identifier
- path: (_) @namespace)
+ path: (_) @module)
(#set! "priority" 105))
; Keywords
@@ -103,7 +103,7 @@
(call_expression
. (scoped_type_identifier
- . (identifier) . "::" . (identifier) @method.call))
+ . (identifier) . "::" . (identifier) @function.method.call))
((call_expression
. (identifier) @function.builtin)
@@ -123,25 +123,25 @@
; Parameters
(parameter
- (_) @parameter . ":")
+ (_) @variable.parameter . ":")
; Fields
((member_expression
- "." (_) @field)
+ "." (_) @variable.member)
(#set! "priority" 105))
(field
- . (identifier) @field)
+ . (identifier) @variable.member)
(field_assignment
- . (identifier) @field)
+ . (identifier) @variable.member)
; Repeats
[
"for"
-] @repeat
+] @keyword.repeat
; Conditionals
@@ -152,7 +152,7 @@
"switch"
"match"
"case"
-] @conditional
+] @keyword.conditional
; Operators
@@ -237,7 +237,7 @@
(number) @number
-(float) @float
+(float) @number.float
(boolean) @boolean
diff --git a/queries/haskell/highlights.scm b/queries/haskell/highlights.scm
index 2c2189c38..92b36434d 100644
--- a/queries/haskell/highlights.scm
+++ b/queries/haskell/highlights.scm
@@ -8,27 +8,27 @@
(pat_wildcard) @variable
(function
- patterns: (patterns (_) @parameter))
+ patterns: (patterns (_) @variable.parameter))
-(exp_lambda (_)+ @parameter "->")
+(exp_lambda (_)+ @variable.parameter "->")
(function
infix: (infix
- lhs: (_) @parameter))
+ lhs: (_) @variable.parameter))
(function
infix: (infix
- rhs: (_) @parameter))
+ rhs: (_) @variable.parameter))
;; ----------------------------------------------------------------------------
;; Literals and comments
(integer) @number
(exp_negation) @number
-(exp_literal (float)) @float
+(exp_literal (float)) @number.float
(char) @character
(string) @string
-(con_unit) @symbol ; unit, as in ()
+(con_unit) @string.special.symbol ; unit, as in ()
(comment) @comment
@@ -82,9 +82,9 @@
[
"forall"
"∀"
-] @repeat
+] @keyword.repeat
-(pragma) @preproc
+(pragma) @keyword.directive
[
"if"
@@ -92,13 +92,13 @@
"else"
"case"
"of"
-] @conditional
+] @keyword.conditional
[
"import"
"qualified"
"module"
-] @include
+] @keyword.import
[
(operator)
@@ -124,12 +124,12 @@
] @operator
-(module) @namespace
+(module) @module
((qualified_module (module) @constructor)
. (module))
-(qualified_type (module) @namespace)
-(qualified_variable (module) @namespace)
-(import (module) @namespace)
+(qualified_type (module) @module)
+(qualified_variable (module) @module)
+(import (module) @module)
(import (module) @constructor . (module))
[
@@ -250,7 +250,7 @@
[
((variable) @function.call)
(qualified_variable (
- (module) @namespace
+ (module) @module
(variable) @function.call))
])
. (operator))
@@ -391,7 +391,7 @@
;; namespaced quasi-quoter
(quasiquote
(_
- (module) @namespace
+ (module) @module
. (variable) @function.call
))
@@ -400,8 +400,8 @@
;; ----------------------------------------------------------------------------
;; Exceptions/error handling
-((variable) @exception
- (#any-of? @exception
+((variable) @keyword.exception
+ (#any-of? @keyword.exception
"error"
"undefined"
"try"
@@ -431,8 +431,8 @@
;; ----------------------------------------------------------------------------
;; Debugging
-((variable) @debug
- (#any-of? @debug
+((variable) @keyword.debug
+ (#any-of? @keyword.debug
"trace"
"traceId"
"traceShow"
@@ -453,11 +453,11 @@
;; ----------------------------------------------------------------------------
;; Fields
-(field (variable) @field)
-(pat_field (variable) @field)
-(exp_projection field: (variable) @field)
-(import_item (type) . (import_con_names (variable) @field))
-(exp_field field: [((variable) @field) (qualified_variable (variable) @field)])
+(field (variable) @variable.member)
+(pat_field (variable) @variable.member)
+(exp_projection field: (variable) @variable.member)
+(import_item (type) . (import_con_names (variable) @variable.member))
+(exp_field field: [((variable) @variable.member) (qualified_variable (variable) @variable.member)])
;; ----------------------------------------------------------------------------
diff --git a/queries/haskell_persistent/highlights.scm b/queries/haskell_persistent/highlights.scm
index afb32f11d..e806befcf 100644
--- a/queries/haskell_persistent/highlights.scm
+++ b/queries/haskell_persistent/highlights.scm
@@ -2,13 +2,13 @@
;; Literals and comments
(integer) @number
-(float) @float
+(float) @number.float
(char) @character
(string) @string
(attribute_name) @attribute
(attribute_exclamation_mark) @attribute
-(con_unit) @symbol ; unit, as in ()
+(con_unit) @string.special.symbol ; unit, as in ()
(comment) @comment @spell
diff --git a/queries/hcl/highlights.scm b/queries/hcl/highlights.scm
index 4cc822abd..bb0de9816 100644
--- a/queries/hcl/highlights.scm
+++ b/queries/hcl/highlights.scm
@@ -48,13 +48,13 @@
"for"
"endfor"
"in"
-] @repeat
+] @keyword.repeat
[
"if"
"else"
"endif"
-] @conditional
+] @keyword.conditional
[
(quoted_template_start) ; "
@@ -84,14 +84,14 @@
(body (block (identifier) @keyword))
(body (block (body (block (identifier) @type))))
(function_call (identifier) @function)
-(attribute (identifier) @field)
+(attribute (identifier) @variable.member)
; { key: val }
;
; highlight identifier keys as though they were block attributes
-(object_elem key: (expression (variable_expr (identifier) @field)))
+(object_elem key: (expression (variable_expr (identifier) @variable.member)))
; var.foo, data.bar
;
; first element in get_attr is a variable.builtin or a reference to a variable.builtin
-(expression (variable_expr (identifier) @variable.builtin) (get_attr (identifier) @field))
+(expression (variable_expr (identifier) @variable.builtin) (get_attr (identifier) @variable.member))
diff --git a/queries/heex/highlights.scm b/queries/heex/highlights.scm
index ed8efb906..f13e5d04f 100644
--- a/queries/heex/highlights.scm
+++ b/queries/heex/highlights.scm
@@ -30,7 +30,7 @@
(comment) @comment @spell
; HEEx text content is treated as markup
-(text) @text
+; (text) @none
; HEEx tags and slots are highlighted as HTML
[
diff --git a/queries/hocon/highlights.scm b/queries/hocon/highlights.scm
index 1fdd6ca4b..f0cc498b4 100644
--- a/queries/hocon/highlights.scm
+++ b/queries/hocon/highlights.scm
@@ -15,12 +15,12 @@
"required"
] @keyword
-(include "include" @include)
+(include "include" @keyword.import)
(substitution ["${" "${?" "}"] @punctuation.special)
-(substitution (_) @field)
+(substitution (_) @variable.member)
-(path (_) @field)
+(path (_) @variable.member)
(value [":" "=" "+=" ] @operator)
[
diff --git a/queries/hoon/highlights.scm b/queries/hoon/highlights.scm
index f7136f63e..029d20c1e 100644
--- a/queries/hoon/highlights.scm
+++ b/queries/hoon/highlights.scm
@@ -27,7 +27,7 @@
(date) @string.special
-(mold) @symbol
+(mold) @string.special.symbol
(specialIndex) @number.builtin
(lark) @operator
-(fullContext) @symbol
+(fullContext) @string.special.symbol
diff --git a/queries/html_tags/highlights.scm b/queries/html_tags/highlights.scm
index 8d39afd49..44626caac 100644
--- a/queries/html_tags/highlights.scm
+++ b/queries/html_tags/highlights.scm
@@ -1,54 +1,54 @@
(tag_name) @tag
-(erroneous_end_tag_name) @error
+; (erroneous_end_tag_name) @error ; we do not lint syntax errors
(comment) @comment @spell
(attribute_name) @tag.attribute
((attribute
(quoted_attribute_value) @string)
(#set! "priority" 99))
-(text) @text @spell
+(text) @none @spell
-((element (start_tag (tag_name) @_tag) (text) @text.title)
+((element (start_tag (tag_name) @_tag) (text) @markup.heading)
(#eq? @_tag "title"))
-((element (start_tag (tag_name) @_tag) (text) @text.title.1)
+((element (start_tag (tag_name) @_tag) (text) @markup.heading.1)
(#eq? @_tag "h1"))
-((element (start_tag (tag_name) @_tag) (text) @text.title.2)
+((element (start_tag (tag_name) @_tag) (text) @markup.heading.2)
(#eq? @_tag "h2"))
-((element (start_tag (tag_name) @_tag) (text) @text.title.3)
+((element (start_tag (tag_name) @_tag) (text) @markup.heading.3)
(#eq? @_tag "h3"))
-((element (start_tag (tag_name) @_tag) (text) @text.title.4)
+((element (start_tag (tag_name) @_tag) (text) @markup.heading.4)
(#eq? @_tag "h4"))
-((element (start_tag (tag_name) @_tag) (text) @text.title.5)
+((element (start_tag (tag_name) @_tag) (text) @markup.heading.5)
(#eq? @_tag "h5"))
-((element (start_tag (tag_name) @_tag) (text) @text.title.6)
+((element (start_tag (tag_name) @_tag) (text) @markup.heading.6)
(#eq? @_tag "h6"))
-((element (start_tag (tag_name) @_tag) (text) @text.strong)
+((element (start_tag (tag_name) @_tag) (text) @markup.strong)
(#any-of? @_tag "strong" "b"))
-((element (start_tag (tag_name) @_tag) (text) @text.emphasis)
+((element (start_tag (tag_name) @_tag) (text) @markup.italic)
(#any-of? @_tag "em" "i"))
-((element (start_tag (tag_name) @_tag) (text) @text.strike)
+((element (start_tag (tag_name) @_tag) (text) @markup.strikethrough)
(#any-of? @_tag "s" "del"))
-((element (start_tag (tag_name) @_tag) (text) @text.underline)
+((element (start_tag (tag_name) @_tag) (text) @markup.underline)
(#eq? @_tag "u"))
-((element (start_tag (tag_name) @_tag) (text) @text.literal)
+((element (start_tag (tag_name) @_tag) (text) @markup.raw)
(#any-of? @_tag "code" "kbd"))
-((element (start_tag (tag_name) @_tag) (text) @text.uri)
+((element (start_tag (tag_name) @_tag) (text) @string.special.url)
(#eq? @_tag "a"))
((attribute
(attribute_name) @_attr
- (quoted_attribute_value (attribute_value) @text.uri))
+ (quoted_attribute_value (attribute_value) @string.special.url))
(#any-of? @_attr "href" "src"))
[
diff --git a/queries/htmldjango/highlights.scm b/queries/htmldjango/highlights.scm
index 814c7c420..214dbb36f 100644
--- a/queries/htmldjango/highlights.scm
+++ b/queries/htmldjango/highlights.scm
@@ -18,8 +18,8 @@
(variable_name) @variable
-(filter_name) @method
-(filter_argument) @parameter
+(filter_name) @function.method
+(filter_argument) @variable.parameter
(keyword) @keyword
diff --git a/queries/http/highlights.scm b/queries/http/highlights.scm
index e03f61253..c5af93714 100644
--- a/queries/http/highlights.scm
+++ b/queries/http/highlights.scm
@@ -4,7 +4,7 @@
; Methods
-(method) @method
+(method) @function.method
; Constants
@@ -16,11 +16,11 @@
; Fields
-(pair name: (identifier) @field)
+(pair name: (identifier) @variable.member)
; Parameters
-(query_param (key) @parameter)
+(query_param (key) @variable.parameter)
; Operators
@@ -35,7 +35,7 @@
(string) @string
-(target_url) @string @text.uri
+(target_url) @string.special.url
(number) @number
diff --git a/queries/hurl/highlights.scm b/queries/hurl/highlights.scm
index a32f1965b..d43c172b8 100644
--- a/queries/hurl/highlights.scm
+++ b/queries/hurl/highlights.scm
@@ -100,7 +100,7 @@
[
(float)
(json_number)
-] @float
+] @number.float
[ ":" "," ] @punctuation.delimiter
@@ -115,13 +115,16 @@
[
"base64,"
- "file,"
"hex,"
- (file_value)
(version)
] @string.special
-(regex) @string.regex
+[
+ "file,"
+ (file_value)
+] @string.special.path
+
+(regex) @string.regexp
(multiline_string_type) @type
diff --git a/queries/ini/highlights.scm b/queries/ini/highlights.scm
index dfe46cc72..d431a78b5 100644
--- a/queries/ini/highlights.scm
+++ b/queries/ini/highlights.scm
@@ -12,5 +12,4 @@
] @operator
(setting (setting_name) @property)
-(setting_value) @text ; grammar does not support subtypes
-(ERROR (setting_name) @text)
+; (setting_value) @none ; grammar does not support subtypes
diff --git a/queries/ispc/highlights.scm b/queries/ispc/highlights.scm
index 6770d6bb9..804b6ee63 100644
--- a/queries/ispc/highlights.scm
+++ b/queries/ispc/highlights.scm
@@ -24,11 +24,11 @@
"foreach_tiled"
"foreach_active"
"foreach_unique"
-] @repeat
+] @keyword.repeat
[
"cif"
-] @conditional
+] @keyword.conditional
[
"varying"
diff --git a/queries/janet_simple/highlights.scm b/queries/janet_simple/highlights.scm
index 2b4ddf95b..25ce38635 100644
--- a/queries/janet_simple/highlights.scm
+++ b/queries/janet_simple/highlights.scm
@@ -1,6 +1,6 @@
;; >> Literals
-(kwd_lit) @symbol
+(kwd_lit) @string.special.symbol
(str_lit) @string
(long_str_lit) @string
(buf_lit) @string
@@ -31,10 +31,10 @@
;; Quoted symbols
(quote_lit
- (sym_lit) @symbol)
+ (sym_lit) @string.special.symbol)
(qq_lit
- (sym_lit) @symbol)
+ (sym_lit) @string.special.symbol)
;; Dynamic variables
diff --git a/queries/java/highlights.scm b/queries/java/highlights.scm
index 27f139ec2..4ff56641d 100644
--- a/queries/java/highlights.scm
+++ b/queries/java/highlights.scm
@@ -7,30 +7,30 @@
; Methods
(method_declaration
- name: (identifier) @method)
+ name: (identifier) @function.method)
(method_invocation
- name: (identifier) @method.call)
+ name: (identifier) @function.method.call)
(super) @function.builtin
; Parameters
(formal_parameter
- name: (identifier) @parameter)
+ name: (identifier) @variable.parameter)
(catch_formal_parameter
- name: (identifier) @parameter)
+ name: (identifier) @variable.parameter)
(spread_parameter
(variable_declarator
- name: (identifier) @parameter)) ; int... foo
+ name: (identifier) @variable.parameter)) ; int... foo
;; Lambda parameter
-(inferred_parameters (identifier) @parameter) ; (x,y) -> ...
+(inferred_parameters (identifier) @variable.parameter) ; (x,y) -> ...
(lambda_expression
- parameters: (identifier) @parameter) ; x -> ...
+ parameters: (identifier) @variable.parameter) ; x -> ...
; Operators
@@ -107,10 +107,10 @@
(field_declaration
declarator: (variable_declarator
- name: (identifier) @field))
+ name: (identifier) @variable.member))
(field_access
- field: (identifier) @field)
+ field: (identifier) @variable.member)
[
(boolean_type)
@@ -153,7 +153,7 @@
[
(decimal_floating_point_literal)
(hex_floating_point_literal)
-] @float
+] @number.float
[
(true)
@@ -204,7 +204,7 @@
[
"transient"
"volatile"
-] @storageclass
+] @keyword.storage
[
"return"
@@ -222,9 +222,9 @@
"else"
"switch"
"case"
-] @conditional
+] @keyword.conditional
-(ternary_expression ["?" ":"] @conditional.ternary)
+(ternary_expression ["?" ":"] @keyword.conditional.ternary)
; Loops
@@ -234,7 +234,7 @@
"do"
"continue"
"break"
-] @repeat
+] @keyword.repeat
; Includes
@@ -247,7 +247,7 @@
"provides"
"requires"
"uses"
-] @include
+] @keyword.import
; Punctuation
@@ -277,7 +277,7 @@
"finally"
"try"
"catch"
-] @exception
+] @keyword.exception
; Labels
diff --git a/queries/javascript/highlights.scm b/queries/javascript/highlights.scm
index 8fc69e6c7..e757dd2bd 100644
--- a/queries/javascript/highlights.scm
+++ b/queries/javascript/highlights.scm
@@ -1,55 +1,55 @@
; inherits: ecma,jsx
;;; Parameters
-(formal_parameters (identifier) @parameter)
+(formal_parameters (identifier) @variable.parameter)
(formal_parameters
(rest_pattern
- (identifier) @parameter))
+ (identifier) @variable.parameter))
;; ({ a }) => null
(formal_parameters
(object_pattern
- (shorthand_property_identifier_pattern) @parameter))
+ (shorthand_property_identifier_pattern) @variable.parameter))
;; ({ a = b }) => null
(formal_parameters
(object_pattern
(object_assignment_pattern
- (shorthand_property_identifier_pattern) @parameter)))
+ (shorthand_property_identifier_pattern) @variable.parameter)))
;; ({ a: b }) => null
(formal_parameters
(object_pattern
(pair_pattern
- value: (identifier) @parameter)))
+ value: (identifier) @variable.parameter)))
;; ([ a ]) => null
(formal_parameters
(array_pattern
- (identifier) @parameter))
+ (identifier) @variable.parameter))
;; ({ a } = { a }) => null
(formal_parameters
(assignment_pattern
(object_pattern
- (shorthand_property_identifier_pattern) @parameter)))
+ (shorthand_property_identifier_pattern) @variable.parameter)))
;; ({ a = b } = { a }) => null
(formal_parameters
(assignment_pattern
(object_pattern
(object_assignment_pattern
- (shorthand_property_identifier_pattern) @parameter))))
+ (shorthand_property_identifier_pattern) @variable.parameter))))
;; a => null
(arrow_function
- parameter: (identifier) @parameter)
+ parameter: (identifier) @variable.parameter)
;; optional parameters
(formal_parameters
(assignment_pattern
- left: (identifier) @parameter))
+ left: (identifier) @variable.parameter))
;; punctuation
(optional_chain) @punctuation.delimiter
diff --git a/queries/jq/highlights.scm b/queries/jq/highlights.scm
index 66acd26f4..e9967e95e 100644
--- a/queries/jq/highlights.scm
+++ b/queries/jq/highlights.scm
@@ -48,7 +48,7 @@
(identifier) @function)
(funcdefargs
- (identifier) @parameter)
+ (identifier) @variable.parameter)
[
"reduce"
@@ -264,7 +264,7 @@
[
"import"
"include"
-] @include
+] @keyword.import
[
"if"
@@ -272,12 +272,12 @@
"elif"
"else"
"end"
-] @conditional
+] @keyword.conditional
[
"try"
"catch"
-] @exception
+] @keyword.exception
[
"or"
diff --git a/queries/jsonnet/highlights.scm b/queries/jsonnet/highlights.scm
index e7ea6d8bb..c8eb38fcc 100644
--- a/queries/jsonnet/highlights.scm
+++ b/queries/jsonnet/highlights.scm
@@ -11,7 +11,7 @@
] @boolean
; Keywords
-"for" @repeat
+"for" @keyword.repeat
"in" @keyword.operator
"function" @keyword.function
@@ -19,7 +19,7 @@
"if"
"then"
"else"
-] @conditional
+] @keyword.conditional
[
(local)
@@ -30,7 +30,7 @@
[
"assert"
"error"
-] @exception
+] @keyword.exception
[
(dollar)
@@ -84,12 +84,12 @@
[
(import)
(importstr)
-] @include
+] @keyword.import
; Fields
-(fieldname (id) @field)
-(fieldname (string (string_content) @field))
+(fieldname (id) @variable.member)
+(fieldname (string (string_content) @variable.member))
; Functions
(field
@@ -98,7 +98,7 @@
function: (fieldname
(string (string_content) @function)))
(param
- identifier: (id) @parameter)
+ identifier: (id) @variable.parameter)
(bind (id) @variable.local)
(bind function: (id) @function)
@@ -113,6 +113,6 @@
"("
(args
(named_argument
- (id) @parameter
+ (id) @variable.parameter
))?
")")
diff --git a/queries/julia/highlights.scm b/queries/julia/highlights.scm
index c1245f4d8..20a154618 100644
--- a/queries/julia/highlights.scm
+++ b/queries/julia/highlights.scm
@@ -14,11 +14,11 @@
name: (identifier) @function.macro)
(quote_expression
- ":" @symbol
- [(identifier) (operator)] @symbol)
+ ":" @string.special.symbol
+ [(identifier) (operator)] @string.special.symbol)
(field_expression
- (identifier) @field .)
+ (identifier) @variable.member .)
;;; Function names
@@ -68,18 +68,18 @@
;;; Parameters
(parameter_list
- (identifier) @parameter)
+ (identifier) @variable.parameter)
(optional_parameter .
- (identifier) @parameter)
+ (identifier) @variable.parameter)
(slurp_parameter
- (identifier) @parameter)
+ (identifier) @variable.parameter)
(typed_parameter
- parameter: (identifier)? @parameter
+ parameter: (identifier)? @variable.parameter
type: (_) @type)
(function_expression
- . (identifier) @parameter) ; Single parameter arrow functions
+ . (identifier) @variable.parameter) ; Single parameter arrow functions
;;; Types
@@ -362,42 +362,42 @@
["let" "end"] @keyword)
(if_statement
- ["if" "end"] @conditional)
+ ["if" "end"] @keyword.conditional)
(elseif_clause
- "elseif" @conditional)
+ "elseif" @keyword.conditional)
(else_clause
- "else" @conditional)
+ "else" @keyword.conditional)
(if_clause
- "if" @conditional) ; `if` clause in comprehensions
+ "if" @keyword.conditional) ; `if` clause in comprehensions
(ternary_expression
- ["?" ":"] @conditional.ternary)
+ ["?" ":"] @keyword.conditional.ternary)
(try_statement
- ["try" "end"] @exception)
+ ["try" "end"] @keyword.exception)
(finally_clause
- "finally" @exception)
+ "finally" @keyword.exception)
(catch_clause
- "catch" @exception)
+ "catch" @keyword.exception)
(for_statement
- ["for" "end"] @repeat)
+ ["for" "end"] @keyword.repeat)
(while_statement
- ["while" "end"] @repeat)
+ ["while" "end"] @keyword.repeat)
(for_clause
- "for" @repeat)
+ "for" @keyword.repeat)
[
(break_statement)
(continue_statement)
-] @repeat
+] @keyword.repeat
(module_definition
- ["module" "baremodule" "end"] @include)
+ ["module" "baremodule" "end"] @keyword.import)
(import_statement
- ["import" "using"] @include)
+ ["import" "using"] @keyword.import)
(import_alias
- "as" @include)
+ "as" @keyword.import)
(export_statement
- "export" @include)
+ "export" @keyword.import)
(selected_import
":" @punctuation.delimiter)
@@ -458,10 +458,10 @@
(boolean_literal) @boolean
(integer_literal) @number
-(float_literal) @float
+(float_literal) @number.float
-((identifier) @float
- (#any-of? @float "NaN" "NaN16" "NaN32"
+((identifier) @number.float
+ (#any-of? @number.float "NaN" "NaN16" "NaN32"
"Inf" "Inf16" "Inf32"))
((identifier) @constant.builtin
diff --git a/queries/kconfig/highlights.scm b/queries/kconfig/highlights.scm
index 2e7c401a1..d2db087ce 100644
--- a/queries/kconfig/highlights.scm
+++ b/queries/kconfig/highlights.scm
@@ -1,4 +1,4 @@
-"source" @include
+"source" @keyword.import
[
"mainmenu"
@@ -24,7 +24,7 @@
"select"
"imply"
"visible if"
-] @conditional
+] @keyword.conditional
[
"def_bool"
@@ -70,10 +70,10 @@
((symbol) @constant
(#lua-match? @constant "[A-Z0-9]+"))
-(mainmenu name: (prompt) @text.title)
-(comment_entry name: (prompt) @text.title)
-(menu name: (prompt) @text.title)
+(mainmenu name: (prompt) @markup.heading)
+(comment_entry name: (prompt) @markup.heading)
+(menu name: (prompt) @markup.heading)
-(source (prompt) @text.uri @string.special)
+(source (prompt) @string.special.url)
(comment) @comment @spell
diff --git a/queries/kdl/highlights.scm b/queries/kdl/highlights.scm
index d903128a8..5aafdeca3 100644
--- a/queries/kdl/highlights.scm
+++ b/queries/kdl/highlights.scm
@@ -29,8 +29,8 @@
(number) @number
-(number (decimal) @float)
-(number (exponent) @float)
+(number (decimal) @number.float)
+(number (exponent) @number.float)
(boolean) @boolean
diff --git a/queries/kotlin/highlights.scm b/queries/kotlin/highlights.scm
index 36bf148f9..1ce0c5430 100644
--- a/queries/kotlin/highlights.scm
+++ b/queries/kotlin/highlights.scm
@@ -97,10 +97,10 @@
))
(package_header "package" @keyword
- . (identifier (simple_identifier) @namespace))
+ . (identifier (simple_identifier) @module))
(import_header
- "import" @include)
+ "import" @keyword.import)
; The last `simple_identifier` in a `import_header` will always either be a function
; or a type. Classes can appear anywhere in the import path, unlike functions
@@ -142,16 +142,16 @@
("init") @constructor)
(parameter
- (simple_identifier) @parameter)
+ (simple_identifier) @variable.parameter)
(parameter_with_optional_type
- (simple_identifier) @parameter)
+ (simple_identifier) @variable.parameter)
; lambda parameters
(lambda_literal
(lambda_parameters
(variable_declaration
- (simple_identifier) @parameter)))
+ (simple_identifier) @variable.parameter)))
;;; Function calls
@@ -227,9 +227,9 @@
((multiline_comment) @comment.documentation
(#lua-match? @comment.documentation "^/[*][*][^*].*[*]/$"))
-(shebang_line) @preproc
+(shebang_line) @keyword.directive
-(real_literal) @float
+(real_literal) @number.float
[
(integer_literal)
(long_literal)
@@ -254,7 +254,7 @@
; - "[abc]?".toRegex()
(call_expression
(navigation_expression
- ((string_literal) @string.regex)
+ ((string_literal) @string.regexp)
(navigation_suffix
((simple_identifier) @_function
(#eq? @_function "toRegex")))))
@@ -266,7 +266,7 @@
(call_suffix
(value_arguments
(value_argument
- (string_literal) @string.regex))))
+ (string_literal) @string.regexp))))
; - Regex.fromLiteral("[abc]?")
(call_expression
@@ -279,7 +279,7 @@
(call_suffix
(value_arguments
(value_argument
- (string_literal) @string.regex))))
+ (string_literal) @string.regexp))))
;;; Keywords
@@ -323,7 +323,7 @@
"if"
"else"
"when"
-] @conditional
+] @keyword.conditional
[
"for"
@@ -333,14 +333,14 @@
"continue@"
"break"
"break@"
-] @repeat
+] @keyword.repeat
[
"try"
"catch"
"throw"
"finally"
-] @exception
+] @keyword.exception
(annotation
diff --git a/queries/kusto/highlights.scm b/queries/kusto/highlights.scm
index 825f49b35..a0ad0a895 100644
--- a/queries/kusto/highlights.scm
+++ b/queries/kusto/highlights.scm
@@ -12,8 +12,8 @@
] @function.call
(typed_parameter
- (identifier) @parameter)
-(function_arguments (identifier) @parameter)
+ (identifier) @variable.parameter)
+(function_arguments (identifier) @variable.parameter)
[
(binary_operator)
diff --git a/queries/lalrpop/highlights.scm b/queries/lalrpop/highlights.scm
index b6fda252e..c0c1a3a81 100644
--- a/queries/lalrpop/highlights.scm
+++ b/queries/lalrpop/highlights.scm
@@ -10,7 +10,7 @@
[
"match"
"else"
-] @conditional
+] @keyword.conditional
[
"+"
@@ -32,7 +32,7 @@
["<" ">"] @punctuation.bracket)
(binding_symbol
- name: (identifier) @parameter)
+ name: (identifier) @variable.parameter)
(bare_symbol
(macro
@@ -54,7 +54,7 @@
[";" ":"] @punctuation.delimiter
-(lifetime (identifier) @storageclass)
+(lifetime (identifier) @keyword.storage)
(string_literal) @string
(regex_literal) @string
diff --git a/queries/latex/highlights.scm b/queries/latex/highlights.scm
index ea66645e5..5ccc2b8fe 100644
--- a/queries/latex/highlights.scm
+++ b/queries/latex/highlights.scm
@@ -6,7 +6,7 @@
command: _ @function)
(key_value_pair
- key: (_) @parameter
+ key: (_) @variable.parameter
value: (_))
[
@@ -15,13 +15,13 @@
(comment_environment)
] @comment @spell
-((line_comment) @preproc
- (#lua-match? @preproc "^%% !TeX"))
+((line_comment) @keyword.directive
+ (#lua-match? @keyword.directive "^%% !TeX"))
[
(brack_group)
(brack_group_argc)
-] @parameter
+] @variable.parameter
[(operator) "="] @operator
@@ -34,12 +34,12 @@
;; General environments
(begin
- command: _ @text.environment
- name: (curly_group_text (text) @text.environment.name))
+ command: _ @markup.environment
+ name: (curly_group_text (text) @markup.environment.name))
(end
- command: _ @text.environment
- name: (curly_group_text (text) @text.environment.name))
+ command: _ @markup.environment
+ name: (curly_group_text (text) @markup.environment.name))
;; Definitions and references
(new_command_definition
@@ -54,11 +54,11 @@
(environment_definition
command: _ @function.macro
- name: (curly_group_text (_) @text.reference))
+ name: (curly_group_text (_) @markup.link))
(theorem_definition
command: _ @function.macro
- name: (curly_group_text (_) @text.environment.name))
+ name: (curly_group_text (_) @markup.environment.name))
(paired_delimiter_definition
command: _ @function.macro
@@ -66,178 +66,178 @@
(label_definition
command: _ @function.macro
- name: (curly_group_text (_) @text.reference))
+ name: (curly_group_text (_) @markup.link))
(label_reference_range
command: _ @function.macro
- from: (curly_group_text (_) @text.reference)
- to: (curly_group_text (_) @text.reference))
+ from: (curly_group_text (_) @markup.link)
+ to: (curly_group_text (_) @markup.link))
(label_reference
command: _ @function.macro
- names: (curly_group_text_list (_) @text.reference))
+ names: (curly_group_text_list (_) @markup.link))
(label_number
command: _ @function.macro
- name: (curly_group_text (_) @text.reference)
- number: (_) @text.reference)
+ name: (curly_group_text (_) @markup.link)
+ number: (_) @markup.link)
(citation
command: _ @function.macro
- keys: (curly_group_text_list) @text.reference)
+ keys: (curly_group_text_list) @markup.link)
(glossary_entry_definition
command: _ @function.macro
- name: (curly_group_text (_) @text.reference))
+ name: (curly_group_text (_) @markup.link))
(glossary_entry_reference
command: _ @function.macro
- name: (curly_group_text (_) @text.reference))
+ name: (curly_group_text (_) @markup.link))
(acronym_definition
command: _ @function.macro
- name: (curly_group_text (_) @text.reference))
+ name: (curly_group_text (_) @markup.link))
(acronym_reference
command: _ @function.macro
- name: (curly_group_text (_) @text.reference))
+ name: (curly_group_text (_) @markup.link))
(color_definition
command: _ @function.macro
- name: (curly_group_text (_) @text.reference))
+ name: (curly_group_text (_) @markup.link))
(color_reference
command: _ @function.macro
- name: (curly_group_text (_) @text.reference))
+ name: (curly_group_text (_) @markup.link))
;; Math
[
(displayed_equation)
(inline_formula)
-] @text.math
+] @markup.math
(math_environment
(begin
- command: _ @text.math
- name: (curly_group_text (text) @text.math)))
+ command: _ @markup.math
+ name: (curly_group_text (text) @markup.math)))
(math_environment
- (text) @text.math)
+ (text) @markup.math)
(math_environment
(end
- command: _ @text.math
- name: (curly_group_text (text) @text.math)))
+ command: _ @markup.math
+ name: (curly_group_text (text) @markup.math)))
;; Sectioning
(title_declaration
- command: _ @namespace
- options: (brack_group (_) @text.title.1)?
- text: (curly_group (_) @text.title.1))
+ command: _ @module
+ options: (brack_group (_) @markup.heading.1)?
+ text: (curly_group (_) @markup.heading.1))
(author_declaration
- command: _ @namespace
+ command: _ @module
authors: (curly_group_author_list
- ((author)+ @text.title.1)))
+ ((author)+ @markup.heading.1)))
(chapter
- command: _ @namespace
- toc: (brack_group (_) @text.title.2)?
- text: (curly_group (_) @text.title.2))
+ command: _ @module
+ toc: (brack_group (_) @markup.heading.2)?
+ text: (curly_group (_) @markup.heading.2))
(part
- command: _ @namespace
- toc: (brack_group (_) @text.title.2)?
- text: (curly_group (_) @text.title.2))
+ command: _ @module
+ toc: (brack_group (_) @markup.heading.2)?
+ text: (curly_group (_) @markup.heading.2))
(section
- command: _ @namespace
- toc: (brack_group (_) @text.title.3)?
- text: (curly_group (_) @text.title.3))
+ command: _ @module
+ toc: (brack_group (_) @markup.heading.3)?
+ text: (curly_group (_) @markup.heading.3))
(subsection
- command: _ @namespace
- toc: (brack_group (_) @text.title.4)?
- text: (curly_group (_) @text.title.4))
+ command: _ @module
+ toc: (brack_group (_) @markup.heading.4)?
+ text: (curly_group (_) @markup.heading.4))
(subsubsection
- command: _ @namespace
- toc: (brack_group (_) @text.title.5)?
- text: (curly_group (_) @text.title.5))
+ command: _ @module
+ toc: (brack_group (_) @markup.heading.5)?
+ text: (curly_group (_) @markup.heading.5))
(paragraph
- command: _ @namespace
- toc: (brack_group (_) @text.title.6)?
- text: (curly_group (_) @text.title.6))
+ command: _ @module
+ toc: (brack_group (_) @markup.heading.6)?
+ text: (curly_group (_) @markup.heading.6))
(subparagraph
- command: _ @namespace
- toc: (brack_group (_) @text.title.6)?
- text: (curly_group (_) @text.title.6))
+ command: _ @module
+ toc: (brack_group (_) @markup.heading.6)?
+ text: (curly_group (_) @markup.heading.6))
;; Beamer frames
(generic_environment
(begin
name: (curly_group_text
- (text) @text.environment.name)
- (#any-of? @text.environment.name "frame"))
+ (text) @markup.environment.name)
+ (#any-of? @markup.environment.name "frame"))
.
- (curly_group (_) @text.title))
+ (curly_group (_) @markup.heading))
((generic_command
command: (command_name) @_name
arg: (curly_group
- (text) @text.title))
+ (text) @markup.heading))
(#eq? @_name "\\frametitle"))
;; Formatting
(text_mode
- content: (curly_group (_) @text))
+ content: (curly_group (_) @none @spell))
((generic_command
command: (command_name) @_name
- arg: (curly_group (_) @text.emphasis))
+ arg: (curly_group (_) @markup.italic))
(#eq? @_name "\\emph"))
((generic_command
command: (command_name) @_name
- arg: (curly_group (_) @text.emphasis))
+ arg: (curly_group (_) @markup.italic))
(#any-of? @_name "\\textit" "\\mathit"))
((generic_command
command: (command_name) @_name
- arg: (curly_group (_) @text.strong))
+ arg: (curly_group (_) @markup.strong))
(#any-of? @_name "\\textbf" "\\mathbf"))
((generic_command
command: (command_name) @_name
.
- arg: (curly_group (_) @text.uri))
+ arg: (curly_group (_) @markup.link.url))
(#any-of? @_name "\\url" "\\href"))
;; File inclusion commands
(class_include
- command: _ @include
+ command: _ @keyword.import
path: (curly_group_path) @string)
(package_include
- command: _ @include
+ command: _ @keyword.import
paths: (curly_group_path_list) @string)
(latex_include
- command: _ @include
+ command: _ @keyword.import
path: (curly_group_path) @string)
(import_include
- command: _ @include
+ command: _ @keyword.import
directory: (curly_group_path) @string
file: (curly_group_path) @string)
(bibtex_include
- command: _ @include
+ command: _ @keyword.import
path: (curly_group_path) @string)
(biblatex_include
- "\\addbibresource" @include
- glob: (curly_group_glob_pattern) @string.regex)
+ "\\addbibresource" @keyword.import
+ glob: (curly_group_glob_pattern) @string.regexp)
(graphics_include
- command: _ @include
+ command: _ @keyword.import
path: (curly_group_path) @string)
(tikz_library_import
- command: _ @include
+ command: _ @keyword.import
paths: (curly_group_path_list) @string)
(text) @spell
diff --git a/queries/ledger/highlights.scm b/queries/ledger/highlights.scm
index 185269a00..8194b50ad 100644
--- a/queries/ledger/highlights.scm
+++ b/queries/ledger/highlights.scm
@@ -23,11 +23,11 @@
(option_value)
(check_in)
(check_out)
-] @text.literal
+] @markup.raw
-((account) @field)
+((account) @variable.member)
-"include" @include
+"include" @keyword.import
[
"account"
diff --git a/queries/leo/highlights.scm b/queries/leo/highlights.scm
index 60f3fefeb..11c2d67e4 100644
--- a/queries/leo/highlights.scm
+++ b/queries/leo/highlights.scm
@@ -34,23 +34,23 @@
"transition"
] @keyword.function
-"import" @include
+"import" @keyword.import
"return" @keyword.return
(return_arrow) @punctuation.delimiter
-"for" @repeat
+"for" @keyword.repeat
[
"else"
"if"
-] @conditional
+] @keyword.conditional
[
(ternary_if)
(ternary_else)
-] @conditional.ternary
+] @keyword.conditional.ternary
[ "(" ")" "{" "}" "[" "]" ] @punctuation.bracket
@@ -118,11 +118,11 @@
] @string.special
;record declaration
-(record_declaration (identifier) @field)
+(record_declaration (identifier) @variable.member)
;struct component
(struct_component_declaration
- (identifier) @field)
+ (identifier) @variable.member)
(type) @type
@@ -140,7 +140,7 @@
(record_type
(locator
- (identifier) @field))
+ (identifier) @variable.member))
(transition_declaration
name: (identifier) @function.builtin)
@@ -159,13 +159,13 @@
(method_call
. (_)
- . (identifier) @method.call)
+ . (identifier) @function.method.call)
(function_parameter
- (identifier) @parameter)
+ (identifier) @variable.parameter)
(struct_declaration
- name: (identifier) @field)
+ name: (identifier) @variable.member)
(variable_declaration
(identifier_or_identifiers
diff --git a/queries/linkerscript/highlights.scm b/queries/linkerscript/highlights.scm
index f933f31ca..0453ded85 100644
--- a/queries/linkerscript/highlights.scm
+++ b/queries/linkerscript/highlights.scm
@@ -13,13 +13,13 @@
; Conditionals
-(conditional_expression [ "?" ":" ] @conditional.ternary)
+(conditional_expression [ "?" ":" ] @keyword.conditional.ternary)
; Variables
(symbol) @variable
-(filename) @string.special @text.underline
+(filename) @string.special.path
; Functions
@@ -27,8 +27,8 @@
function: (symbol) @function.call)
((call_expression
- function: (symbol) @preproc)
- (#eq? @preproc "DEFINED"))
+ function: (symbol) @keyword.directive)
+ (#eq? @keyword.directive "DEFINED"))
((call_expression
function: (symbol) @function.builtin)
@@ -52,7 +52,7 @@
[
"ORIGIN" "org" "o"
"LENGTH" "len" "l"
-] @field.builtin
+] @variable.member.builtin
; Constants
@@ -80,7 +80,7 @@
; Exceptions
-"ASSERT" @exception
+"ASSERT" @keyword.exception
[
"/DISCARD/"
diff --git a/queries/liquidsoap/highlights.scm b/queries/liquidsoap/highlights.scm
index fcf553e3b..45b5abe05 100644
--- a/queries/liquidsoap/highlights.scm
+++ b/queries/liquidsoap/highlights.scm
@@ -25,7 +25,7 @@
"for"
"for_end"
"while_end"
-] @repeat
+] @keyword.repeat
[
"if"
@@ -33,15 +33,15 @@
"elsif"
"else"
"if_end"
-] @conditional
+] @keyword.conditional
[
"try"
"catch"
"try_end"
-] @exception
+] @keyword.exception
-(inline_if [ "?" ":" ] @conditional.ternary)
+(inline_if [ "?" ":" ] @keyword.conditional.ternary)
[
"%ifdef"
@@ -53,12 +53,12 @@
"%endif"
"%argsof"
"%include"
-] @preproc
+] @keyword.directive
(encoder_name) @constant.builtin
-(anonymous_argument (var) @parameter)
-(labeled_argument label: (var) @parameter)
+(anonymous_argument (var) @variable.parameter)
+(labeled_argument label: (var) @variable.parameter)
"." @punctuation.delimiter
@@ -72,14 +72,14 @@
] @punctuation.bracket
(app name: (var) @function.call)
-(method) @method
-(method_app) @method.call
+(method) @function.method
+(method_app) @function.method.call
(string) @string
(string_interpolation [ "#{" "}" ] @punctuation.special)
(integer) @number
-(float) @float
+(float) @number.float
(bool) @boolean
(comment) @comment
-(regexp) @string.regex
+(regexp) @string.regexp
(type) @type
diff --git a/queries/llvm/highlights.scm b/queries/llvm/highlights.scm
index 37a31a3bb..96b8bab93 100644
--- a/queries/llvm/highlights.scm
+++ b/queries/llvm/highlights.scm
@@ -14,7 +14,7 @@
(global_type
(local_var) @type.definition)
-(argument) @parameter
+(argument) @variable.parameter
(_ inst_name: _ @keyword.operator)
@@ -101,7 +101,7 @@
"localexec"
(unnamed_addr)
(dll_storage_class)
-] @storageclass
+] @keyword.storage
(attribute_name) @attribute
@@ -117,7 +117,7 @@
(cstring) @string
(label) @label
(_ inst_name: "ret" @keyword.return)
-(float) @float
+(float) @number.float
[
(struct_value)
diff --git a/queries/lua/highlights.scm b/queries/lua/highlights.scm
index 2f12d3ce2..0cb861596 100644
--- a/queries/lua/highlights.scm
+++ b/queries/lua/highlights.scm
@@ -21,13 +21,13 @@
"while"
"do"
"end"
-] @repeat)
+] @keyword.repeat)
(repeat_statement
[
"repeat"
"until"
-] @repeat)
+] @keyword.repeat)
(if_statement
[
@@ -36,27 +36,27 @@
"else"
"then"
"end"
-] @conditional)
+] @keyword.conditional)
(elseif_statement
[
"elseif"
"then"
"end"
-] @conditional)
+] @keyword.conditional)
(else_statement
[
"else"
"end"
-] @conditional)
+] @keyword.conditional)
(for_statement
[
"for"
"do"
"end"
-] @repeat)
+] @keyword.repeat)
(function_declaration
[
@@ -133,8 +133,8 @@
((identifier) @variable.builtin
(#eq? @variable.builtin "self"))
-((identifier) @namespace.builtin
- (#any-of? @namespace.builtin "_G" "debug" "io" "jit" "math" "os" "package" "string" "table" "utf8"))
+((identifier) @module.builtin
+ (#any-of? @module.builtin "_G" "debug" "io" "jit" "math" "os" "package" "string" "table" "utf8"))
((identifier) @keyword.coroutine
(#eq? @keyword.coroutine "coroutine"))
@@ -167,9 +167,9 @@
;; Tables
-(field name: (identifier) @field)
+(field name: (identifier) @variable.member)
-(dot_index_expression field: (identifier) @field)
+(dot_index_expression field: (identifier) @variable.member)
(table_constructor
[
@@ -179,9 +179,9 @@
;; Functions
-(parameters (identifier) @parameter)
+(parameters (identifier) @variable.parameter)
-(vararg_expression) @parameter.builtin
+(vararg_expression) @variable.parameter.builtin
(function_declaration
name: [
@@ -192,7 +192,7 @@
(function_declaration
name: (method_index_expression
- method: (identifier) @method))
+ method: (identifier) @function.method))
(assignment_statement
(variable_list .
@@ -215,7 +215,7 @@
(dot_index_expression
field: (identifier) @function.call)
(method_index_expression
- method: (identifier) @method.call)
+ method: (identifier) @function.method.call)
])
(function_call
@@ -240,7 +240,7 @@
((comment) @comment.documentation
(#lua-match? @comment.documentation "^[-][-](%s?)@"))
-(hash_bang_line) @preproc
+(hash_bang_line) @keyword.directive
(number) @number
@@ -257,7 +257,7 @@
. (_)
.
(string
- content: (string_content) @string.regex)))
+ content: (string_content) @string.regexp)))
;("123"):match("%d+")
(function_call
@@ -266,4 +266,4 @@
(#any-of? @_method "find" "match" "gmatch" "gsub"))
arguments: (arguments
. (string
- content: (string_content) @string.regex)))
+ content: (string_content) @string.regexp)))
diff --git a/queries/luadoc/highlights.scm b/queries/luadoc/highlights.scm
index ec8bcb765..3555039dc 100644
--- a/queries/luadoc/highlights.scm
+++ b/queries/luadoc/highlights.scm
@@ -3,7 +3,7 @@
[
"@module"
"@package"
-] @include
+] @keyword.import
[
"@class"
@@ -38,8 +38,8 @@
(function_type ["fun" "function"] @keyword.function)
(source_annotation
- filename: (identifier) @text.uri @string.special
- extension: (identifier) @text.uri @string.special)
+ filename: (identifier) @string.special.path
+ extension: (identifier) @string.special.path)
(version_annotation
version: _ @constant.builtin)
@@ -75,17 +75,17 @@
; Parameters
-(param_annotation (identifier) @parameter)
+(param_annotation (identifier) @variable.parameter)
-(parameter (identifier) @parameter)
+(parameter (identifier) @variable.parameter)
; Fields
-(field_annotation (identifier) @field)
+(field_annotation (identifier) @variable.member)
-(table_literal_type field: (identifier) @field)
+(table_literal_type field: (identifier) @variable.member)
-(member_type ["#" "."] . (identifier) @field)
+(member_type ["#" "."] . (identifier) @variable.member)
; Types
@@ -110,7 +110,7 @@
; Literals
-(string) @namespace ; only used in @module
+(string) @module ; only used in @module
(literal_type) @string
diff --git a/queries/luap/highlights.scm b/queries/luap/highlights.scm
index 87e6c6908..0f95d4eff 100644
--- a/queries/luap/highlights.scm
+++ b/queries/luap/highlights.scm
@@ -33,4 +33,4 @@
(negated_set "^" @operator)
(balanced_match
- (character) @parameter)
+ (character) @variable.parameter)
diff --git a/queries/luau/highlights.scm b/queries/luau/highlights.scm
index 4cd0b443c..5fdfb5006 100644
--- a/queries/luau/highlights.scm
+++ b/queries/luau/highlights.scm
@@ -1,6 +1,6 @@
; Preproc
-(hash_bang_line) @preproc
+(hash_bang_line) @keyword.directive
;; Keywords
@@ -23,18 +23,18 @@
"while"
"do"
"end"
-] @repeat)
+] @keyword.repeat)
(repeat_statement
[
"repeat"
"until"
-] @repeat)
+] @keyword.repeat)
[
(break_statement)
(continue_statement)
-] @repeat
+] @keyword.repeat
(if_statement
[
@@ -43,27 +43,27 @@
"else"
"then"
"end"
-] @conditional)
+] @keyword.conditional)
(elseif_statement
[
"elseif"
"then"
"end"
-] @conditional)
+] @keyword.conditional)
(else_statement
[
"else"
"end"
-] @conditional)
+] @keyword.conditional)
(for_statement
[
"for"
"do"
"end"
-] @repeat)
+] @keyword.repeat)
(function_declaration
[
@@ -149,19 +149,19 @@
((identifier) @variable.builtin
(#eq? @variable.builtin "self"))
-((identifier) @namespace.builtin
- (#any-of? @namespace.builtin "_G" "debug" "io" "jit" "math" "os" "package" "string" "table" "utf8"))
+((identifier) @module.builtin
+ (#any-of? @module.builtin "_G" "debug" "io" "jit" "math" "os" "package" "string" "table" "utf8"))
((identifier) @keyword.coroutine
(#eq? @keyword.coroutine "coroutine"))
;; Tables
-(field name: (identifier) @field)
+(field name: (identifier) @variable.member)
-(dot_index_expression field: (identifier) @field)
+(dot_index_expression field: (identifier) @variable.member)
-(object_type (identifier) @field)
+(object_type (identifier) @variable.member)
(table_constructor
[
@@ -171,8 +171,8 @@
; Functions
-(parameter . (identifier) @parameter)
-(function_type (identifier) @parameter)
+(parameter . (identifier) @variable.parameter)
+(function_type (identifier) @variable.parameter)
(function_call name: (identifier) @function.call)
(function_declaration name: (identifier) @function)
@@ -180,7 +180,7 @@
(function_call name: (dot_index_expression field: (identifier) @function.call))
(function_declaration name: (dot_index_expression field: (identifier) @function))
-(method_index_expression method: (identifier) @method.call)
+(method_index_expression method: (identifier) @function.method.call)
(function_call
(identifier) @function.builtin
@@ -252,11 +252,11 @@
(dot_index_expression
field: (identifier) @_method
(#any-of? @_method "find" "format" "match" "gmatch" "gsub"))
- arguments: (arguments . (_) . (string content: _ @string.regex)))
+ arguments: (arguments . (_) . (string content: _ @string.regexp)))
; ("123"):match("%d+")
(function_call
(method_index_expression
method: (identifier) @_method
(#any-of? @_method "find" "format" "match" "gmatch" "gsub"))
- arguments: (arguments . (string content: _ @string.regex)))
+ arguments: (arguments . (string content: _ @string.regexp)))
diff --git a/queries/m68k/highlights.scm b/queries/m68k/highlights.scm
index edb36cd57..e37c55ae0 100644
--- a/queries/m68k/highlights.scm
+++ b/queries/m68k/highlights.scm
@@ -7,9 +7,9 @@
(directive_mnemonic)
] @function.builtin
-(include (directive_mnemonic) @include)
-(include_bin (directive_mnemonic) @include)
-(include_dir (directive_mnemonic) @include)
+(include (directive_mnemonic) @keyword.import)
+(include_bin (directive_mnemonic) @keyword.import)
+(include_dir (directive_mnemonic) @keyword.import)
(size) @attribute
@@ -17,10 +17,8 @@
(macro_definition name: (symbol) @function.macro)
(macro_call name: (symbol) @function.macro)
-[
- (path)
- (string_literal)
-] @string
+(string_literal) @string
+(path) @string.special.path
[
(decimal_literal)
@@ -44,8 +42,8 @@
(named_register)
] @keyword
-(repeat (control_mnemonic) @repeat)
-(conditional (control_mnemonic) @conditional)
+(repeat (control_mnemonic) @keyword.repeat)
+(conditional (control_mnemonic) @keyword.conditional)
(comment) @comment @spell
@@ -68,4 +66,4 @@
")+"
] @punctuation.bracket
-(section) @namespace
+(section) @module
diff --git a/queries/make/highlights.scm b/queries/make/highlights.scm
index b224a6765..e1d7aa4f7 100644
--- a/queries/make/highlights.scm
+++ b/queries/make/highlights.scm
@@ -7,8 +7,8 @@
"ifneq"
"ifdef"
"ifndef"
- ] @conditional)
- "endif" @conditional)
+ ] @keyword.conditional)
+ "endif" @keyword.conditional)
(rule (targets (word) @function))
@@ -41,10 +41,12 @@
(export_directive "export" @keyword)
(override_directive "override" @keyword)
-(include_directive ["include" "-include"] @include)
+(include_directive
+ ["include" "-include"] @keyword.import
+ filenames: (list (word) @string.special.path))
(variable_assignment
- name: (word) @symbol
+ name: (word) @string.special.symbol
[
"?="
":="
@@ -55,12 +57,12 @@
] @operator)
(shell_assignment
- name: (word) @symbol
+ name: (word) @string.special.symbol
"!=" @operator)
(define_directive
"define" @keyword
- name: (word) @symbol
+ name: (word) @string.special.symbol
[
"="
":="
diff --git a/queries/markdown/highlights.scm b/queries/markdown/highlights.scm
index 9ffc6ee86..aa7b6a66c 100644
--- a/queries/markdown/highlights.scm
+++ b/queries/markdown/highlights.scm
@@ -1,38 +1,54 @@
;From MDeiml/tree-sitter-markdown & Helix
-(setext_heading (paragraph) @text.title.1 (setext_h1_underline) @text.title.1.marker)
-(setext_heading (paragraph) @text.title.2 (setext_h2_underline) @text.title.2.marker)
+(setext_heading (paragraph) @markup.heading.1 (setext_h1_underline) @markup.heading.1.marker)
+(setext_heading (paragraph) @markup.heading.2 (setext_h2_underline) @markup.heading.2.marker)
-(atx_heading (atx_h1_marker) @text.title.1.marker (inline) @text.title.1)
-(atx_heading (atx_h2_marker) @text.title.2.marker (inline) @text.title.2)
-(atx_heading (atx_h3_marker) @text.title.3.marker (inline) @text.title.3)
-(atx_heading (atx_h4_marker) @text.title.4.marker (inline) @text.title.4)
-(atx_heading (atx_h5_marker) @text.title.5.marker (inline) @text.title.5)
-(atx_heading (atx_h6_marker) @text.title.6.marker (inline) @text.title.6)
-
-(link_title) @text.literal
-(indented_code_block) @text.literal.block
-((fenced_code_block) @text.literal.block (#set! "priority" 90))
+(atx_heading (atx_h1_marker) @markup.heading.1.marker (inline) @markup.heading.1)
+(atx_heading (atx_h2_marker) @markup.heading.2.marker (inline) @markup.heading.2)
+(atx_heading (atx_h3_marker) @markup.heading.3.marker (inline) @markup.heading.3)
+(atx_heading (atx_h4_marker) @markup.heading.4.marker (inline) @markup.heading.4)
+(atx_heading (atx_h5_marker) @markup.heading.5.marker (inline) @markup.heading.5)
+(atx_heading (atx_h6_marker) @markup.heading.6.marker (inline) @markup.heading.6)
(info_string) @label
-(pipe_table_header (pipe_table_cell) @text.title)
+(pipe_table_header (pipe_table_cell) @markup.heading)
(pipe_table_header "|" @punctuation.special)
(pipe_table_row "|" @punctuation.special)
(pipe_table_delimiter_row "|" @punctuation.special)
(pipe_table_delimiter_cell) @punctuation.special
-[
- (fenced_code_block_delimiter)
-] @punctuation.delimiter
+;; Code blocks (conceal backticks and language annotation)
+(indented_code_block) @markup.raw.block
+
+((fenced_code_block) @markup.raw.block
+ (#set! "priority" 90))
-;; Conceal backticks
(fenced_code_block
(fenced_code_block_delimiter) @conceal
(#set! conceal ""))
+
(fenced_code_block
- (info_string (language) @conceal
- (#set! conceal "")))
+ (info_string
+ (language) @conceal
+ (#set! conceal "")))
+
+[
+ (link_destination)
+] @markup.link.url
+
+[
+ (link_title)
+ (link_label)
+] @markup.link.label
+
+[
+ (list_marker_plus)
+ (list_marker_minus)
+ (list_marker_star)
+ (list_marker_dot)
+ (list_marker_parenthesis)
+] @markup.list
; NOTE: The following has been commented out due to issues with spaces in the
; list marker nodes generated by the parser. If those spaces ever get captured
@@ -58,28 +74,12 @@
(code_fence_content) @none
-[
- (link_destination)
-] @text.uri
-
-[
- (link_label)
-] @text.reference
-
-[
- (list_marker_plus)
- (list_marker_minus)
- (list_marker_star)
- (list_marker_dot)
- (list_marker_parenthesis)
- (thematic_break)
-] @punctuation.special
-
+(thematic_break) @punctuation.special
-(task_list_marker_unchecked) @text.todo.unchecked
-(task_list_marker_checked) @text.todo.checked
+(task_list_marker_unchecked) @markup.list.unchecked
+(task_list_marker_checked) @markup.list.checked
-((block_quote) @text.quote (#set! "priority" 90))
+((block_quote) @markup.quote (#set! "priority" 90))
[
(block_continuation)
diff --git a/queries/markdown_inline/highlights.scm b/queries/markdown_inline/highlights.scm
index f9589bdd9..a1f63328b 100644
--- a/queries/markdown_inline/highlights.scm
+++ b/queries/markdown_inline/highlights.scm
@@ -1,49 +1,36 @@
;; From MDeiml/tree-sitter-markdown
-[
- (code_span)
- (link_title)
-] @text.literal @nospell
-
-[
- (emphasis_delimiter)
- (code_span_delimiter)
-] @punctuation.delimiter
+(code_span) @markup.raw @nospell
-(emphasis) @text.emphasis
+(emphasis) @markup.italic
-(strong_emphasis) @text.strong
+(strong_emphasis) @markup.strong
-(strikethrough) @text.strike
+(strikethrough) @markup.strikethrough
[
(link_destination)
(uri_autolink)
-] @text.uri @nospell
+] @markup.link.url @nospell
(shortcut_link (link_text) @nospell)
[
(link_label)
(link_text)
+ (link_title)
(image_description)
-] @text.reference
+] @markup.link.label
[
(backslash_escape)
(hard_line_break)
] @string.escape
-(image "!" @punctuation.special)
-(image ["[" "]" "(" ")"] @punctuation.bracket)
-(inline_link ["[" "]" "(" ")"] @punctuation.bracket)
-(shortcut_link ["[" "]"] @punctuation.bracket)
-
; Conceal codeblock and text style markers
-([
- (code_span_delimiter)
- (emphasis_delimiter)
-] @conceal
-(#set! conceal ""))
+((code_span_delimiter) @markup.raw
+ (#set! conceal ""))
+((emphasis_delimiter) @markup.strong
+ (#set! conceal ""))
; Conceal inline links
(inline_link
@@ -53,7 +40,7 @@
"("
(link_destination)
")"
- ] @conceal
+ ] @markup.link
(#set! conceal ""))
; Conceal image links
@@ -65,7 +52,7 @@
"("
(link_destination)
")"
- ] @conceal
+ ] @markup.link
(#set! conceal ""))
; Conceal full reference links
@@ -74,7 +61,7 @@
"["
"]"
(link_label)
- ] @conceal
+ ] @markup.link
(#set! conceal ""))
; Conceal collapsed reference links
@@ -82,7 +69,7 @@
[
"["
"]"
- ] @conceal
+ ] @markup.link
(#set! conceal ""))
; Conceal shortcut links
@@ -90,13 +77,13 @@
[
"["
"]"
- ] @conceal
+ ] @markup.link
(#set! conceal ""))
;; Replace common HTML entities.
-((entity_reference) @conceal (#eq? @conceal "&nbsp;") (#set! conceal ""))
-((entity_reference) @conceal (#eq? @conceal "&lt;") (#set! conceal "<"))
-((entity_reference) @conceal (#eq? @conceal "&gt;") (#set! conceal ">"))
-((entity_reference) @conceal (#eq? @conceal "&amp;") (#set! conceal "&"))
-((entity_reference) @conceal (#eq? @conceal "&quot;") (#set! conceal "\""))
-((entity_reference) @conceal (#any-of? @conceal "&ensp;" "&emsp;") (#set! conceal " ")) \ No newline at end of file
+((entity_reference) @character.special (#eq? @character.special "&nbsp;") (#set! conceal ""))
+((entity_reference) @character.special (#eq? @character.special "&lt;") (#set! conceal "<"))
+((entity_reference) @character.special (#eq? @character.special "&gt;") (#set! conceal ">"))
+((entity_reference) @character.special (#eq? @character.special "&amp;") (#set! conceal "&"))
+((entity_reference) @character.special (#eq? @character.special "&quot;") (#set! conceal "\""))
+((entity_reference) @character.special (#any-of? @character.special "&ensp;" "&emsp;") (#set! conceal " "))
diff --git a/queries/matlab/highlights.scm b/queries/matlab/highlights.scm
index 9f8303a3d..a2e73ee62 100644
--- a/queries/matlab/highlights.scm
+++ b/queries/matlab/highlights.scm
@@ -1,7 +1,7 @@
; Includes
-((command_name) @include
- (#eq? @include "import"))
+((command_name) @keyword.import
+ (#eq? @keyword.import "import"))
; Keywords
@@ -19,24 +19,24 @@
; Conditionals
-(if_statement [ "if" "end" ] @conditional)
-(elseif_clause "elseif" @conditional)
-(else_clause "else" @conditional)
-(switch_statement [ "switch" "end" ] @conditional)
-(case_clause "case" @conditional)
-(otherwise_clause "otherwise" @conditional)
-(break_statement) @conditional
+(if_statement [ "if" "end" ] @keyword.conditional)
+(elseif_clause "elseif" @keyword.conditional)
+(else_clause "else" @keyword.conditional)
+(switch_statement [ "switch" "end" ] @keyword.conditional)
+(case_clause "case" @keyword.conditional)
+(otherwise_clause "otherwise" @keyword.conditional)
+(break_statement) @keyword.conditional
; Repeats
-(for_statement [ "for" "parfor" "end" ] @repeat)
-(while_statement [ "while" "end" ] @repeat)
-(continue_statement) @repeat
+(for_statement [ "for" "parfor" "end" ] @keyword.repeat)
+(while_statement [ "while" "end" ] @keyword.repeat)
+(continue_statement) @keyword.repeat
; Exceptions
-(try_statement [ "try" "end" ] @exception)
-(catch_clause "catch" @exception)
+(try_statement [ "try" "end" ] @keyword.exception)
+(catch_clause "catch" @keyword.exception)
; Variables
@@ -51,7 +51,7 @@
; Fields/Properties
-(field_expression field: (identifier) @field)
+(field_expression field: (identifier) @variable.member)
(superclass "." (identifier) @property)
@@ -87,13 +87,13 @@
(validation_functions (identifier) @function)
(command (command_name) @function.call)
-(command_argument) @parameter
+(command_argument) @variable.parameter
(return_statement) @keyword.return
; Parameters
-(function_arguments (identifier) @parameter)
+(function_arguments (identifier) @variable.parameter)
; Punctuation
diff --git a/queries/menhir/highlights.scm b/queries/menhir/highlights.scm
index 8b4b41d59..8c4e402c0 100644
--- a/queries/menhir/highlights.scm
+++ b/queries/menhir/highlights.scm
@@ -1,5 +1,5 @@
["%parameter" "%token" "%type" "%start" "%attribute" "%left" "%right" "%nonassoc" "%public" "%inline" "%prec"] @keyword
-["%on_error_reduce"] @exception
+["%on_error_reduce"] @keyword.exception
["let"] @keyword.function
@@ -15,7 +15,7 @@
(old_rule [(symbol)] @function)
(new_rule [(lid)] @function)
-(precedence [(symbol)] @parameter)
+(precedence [(symbol)] @variable.parameter)
(funcall) @function.call
diff --git a/queries/mermaid/highlights.scm b/queries/mermaid/highlights.scm
index 2f3e31b90..b661f8ad8 100644
--- a/queries/mermaid/highlights.scm
+++ b/queries/mermaid/highlights.scm
@@ -99,12 +99,12 @@
"&"
] @operator
-(sequence_actor) @field
-(class_name) @field
+(sequence_actor) @variable.member
+(class_name) @variable.member
-(state_name) @field
+(state_name) @variable.member
-(gantt_task_text) @field
+(gantt_task_text) @variable.member
[
(class_annotation_line)
@@ -116,10 +116,10 @@
(state_annotation_choice)
] @attribute
-(directive) @include
+(directive) @keyword.import
(pie_label) @string
-(pie_value) @float
+(pie_value) @number.float
[
(flowchart_direction_lr)
@@ -128,7 +128,7 @@
(flowchart_direction_bt)
] @constant
-(flow_vertex_id) @field
+(flow_vertex_id) @variable.member
[
(flow_link_arrow)
@@ -164,10 +164,10 @@
(er_reltype_identifying)
] @operator
-(er_entity_name) @field
+(er_entity_name) @variable.member
(er_attribute_type) @type
-(er_attribute_name) @field
+(er_attribute_name) @variable.member
[
(er_attribute_key_type_pk)
diff --git a/queries/meson/highlights.scm b/queries/meson/highlights.scm
index 14fc52136..a61e6b1e6 100644
--- a/queries/meson/highlights.scm
+++ b/queries/meson/highlights.scm
@@ -40,21 +40,21 @@
] @operator
(ternaryoperator
- ["?" ":"] @conditional.ternary)
+ ["?" ":"] @keyword.conditional.ternary)
[
"if"
"elif"
"else"
"endif"
-] @conditional
+] @keyword.conditional
[
"foreach"
"endforeach"
(keyword_break)
(keyword_continue)
-] @repeat
+] @keyword.repeat
(string) @string
diff --git a/queries/mlir/highlights.scm b/queries/mlir/highlights.scm
index 2037ff78e..ff768a19d 100644
--- a/queries/mlir/highlights.scm
+++ b/queries/mlir/highlights.scm
@@ -274,7 +274,7 @@
(complex_literal)
] @number
-(float_literal) @float
+(float_literal) @number.float
(bool_literal) @boolean
[
@@ -328,8 +328,8 @@
(func_dialect name: (symbol_ref_id) @function)
(llvm_dialect name: (symbol_ref_id) @function)
-(func_arg_list (value_use) @parameter)
-(block_arg_list (value_use) @parameter)
+(func_arg_list (value_use) @variable.parameter)
+(block_arg_list (value_use) @variable.parameter)
(caret_id) @tag
(value_use) @variable
diff --git a/queries/nasm/highlights.scm b/queries/nasm/highlights.scm
index 1556f9ca5..d588635fc 100644
--- a/queries/nasm/highlights.scm
+++ b/queries/nasm/highlights.scm
@@ -23,7 +23,7 @@
"?" @constant.builtin
(conditional_expression
- [ "?" ":" ] @conditional.ternary)
+ [ "?" ":" ] @keyword.conditional.ternary)
[
":"
@@ -58,7 +58,7 @@
(string_literal) @string
-(float_literal) @float
+(float_literal) @number.float
[
(packed_bcd_literal)
@@ -83,18 +83,18 @@
(preproc_pragma)
(preproc_line)
(preproc_clear)
-] @preproc
+] @keyword.directive
-(preproc_include) @include
+(preproc_include) @keyword.import
-(preproc_rep_loop) @repeat
+(preproc_rep_loop) @keyword.repeat
-(preproc_if) @conditional
+(preproc_if) @keyword.conditional
[
(preproc_def)
(preproc_undef)
-] @define
+] @keyword.directive.define
(preproc_function_def) @keyword.function
diff --git a/queries/nickel/highlights.scm b/queries/nickel/highlights.scm
index f4df28030..e340c37f7 100644
--- a/queries/nickel/highlights.scm
+++ b/queries/nickel/highlights.scm
@@ -11,10 +11,10 @@
"fun" @keyword.function
-"import" @include
+"import" @keyword.import
-[ "if" "then" "else" ] @conditional
-"match" @conditional
+[ "if" "then" "else" ] @keyword.conditional
+"match" @keyword.conditional
(types) @type
"Array" @type.builtin
@@ -46,13 +46,13 @@
(interpolation_start) @punctuation.bracket
(interpolation_end) @punctuation.bracket
-(record_field) @field
+(record_field) @variable.member
(builtin) @function.builtin
(fun_expr pats:
(pattern id:
- (ident) @parameter
+ (ident) @variable.parameter
)
)
diff --git a/queries/nim/highlights.scm b/queries/nim/highlights.scm
index a6e28038e..1a7da2ba2 100644
--- a/queries/nim/highlights.scm
+++ b/queries/nim/highlights.scm
@@ -27,7 +27,7 @@
(pragma_list) @variable))
; NOTE: has to be after
; (type_expression) @type
-; and before @preproc and all literals
+; and before @keyword.directive and all literals
; constants/enums in array construction
(array_construction
@@ -86,14 +86,14 @@
[ "(" ")" "[" "[:" "]" "{" "}" ] @punctuation.bracket
; =============================================================================
-; @preproc ; various preprocessor directives & shebangs
+; @keyword.directive ; various preprocessor directives & shebangs
[
"macro"
"template"
-] @preproc
+] @keyword.directive
-(pragma_list ["{." "}" ".}"] @preproc)
+(pragma_list ["{." "}" ".}"] @keyword.directive)
; NOTE: has to come after @punctuation.bracket
; =============================================================================
@@ -156,9 +156,9 @@
(custom_numeric_literal) @number
; =============================================================================
-; @float ; floating-point number literals
+; @number.float ; floating-point number literals
-(float_literal) @float
+(float_literal) @number.float
; =============================================================================
; @function ; function definitions
@@ -294,14 +294,14 @@
])
; =============================================================================
-; @method ; method definitions
+; @function.method ; method definitions
(method_declaration
name: [
- (identifier) @method
- (accent_quoted (identifier) @method)
- (exported_symbol (identifier) @method)
- (exported_symbol (accent_quoted (identifier) @method))
+ (identifier) @function.method
+ (accent_quoted (identifier) @function.method)
+ (exported_symbol (identifier) @function.method)
+ (exported_symbol (accent_quoted (identifier) @function.method))
])
; =============================================================================
@@ -403,7 +403,7 @@
] @keyword.return
; =============================================================================
-; @conditional ; keywords related to conditionals (e.g. `if` / `else`)
+; @keyword.conditional ; keywords related to conditionals (e.g. `if` / `else`)
[
"if"
@@ -411,21 +411,21 @@
"case"
"elif"
"else"
-] @conditional
+] @keyword.conditional
-(of_branch "of" @conditional)
+(of_branch "of" @keyword.conditional)
; =============================================================================
-; @repeat ; keywords related to loops (e.g. `for` / `while`)
+; @keyword.repeat ; keywords related to loops (e.g. `for` / `while`)
[
"for"
"while"
"continue"
"break"
-] @repeat
+] @keyword.repeat
-(for "in" @repeat)
+(for "in" @keyword.repeat)
; =============================================================================
; @label ; GOTO and other labels (e.g. `label:` in C)
@@ -437,27 +437,27 @@
])
; =============================================================================
-; @include ; keywords for including modules (e.g. `import` / `from` in Python)
+; @keyword.import ; keywords for including modules (e.g. `import` / `from` in Python)
[
"import"
"include"
"export"
-] @include
+] @keyword.import
-(import_from_statement "from" @include)
+(import_from_statement "from" @keyword.import)
-(except_clause "except" @include)
+(except_clause "except" @keyword.import)
; =============================================================================
-; @exception ; keywords related to exceptions (e.g. `throw` / `catch`)
+; @keyword.exception ; keywords related to exceptions (e.g. `throw` / `catch`)
[
"try"
"except"
"finally"
"raise"
-] @exception
+] @keyword.exception
; =============================================================================
; @type ; type or class definitions and annotations
@@ -505,15 +505,15 @@
; where `tuple` is captured as @keyword
; =============================================================================
-; @parameter ; parameters of a function
+; @variable.parameter ; parameters of a function
; named parameters when calling
; call(parameter_name=arg)
(argument_list
(equal_expression
left: [
- (identifier) @parameter
- (accent_quoted (identifier) @parameter)
+ (identifier) @variable.parameter
+ (accent_quoted (identifier) @variable.parameter)
]))
; parameters in function declaration
@@ -522,8 +522,8 @@
(symbol_declaration_list
(symbol_declaration
name: [
- (identifier) @parameter
- (accent_quoted (identifier) @parameter)
+ (identifier) @variable.parameter
+ (accent_quoted (identifier) @variable.parameter)
]))))
; NOTE: needs to be after @type
@@ -533,8 +533,8 @@
(symbol_declaration_list
(symbol_declaration
name: [
- (identifier) @parameter
- (accent_quoted (identifier) @parameter)
+ (identifier) @variable.parameter
+ (accent_quoted (identifier) @variable.parameter)
])))))
; for loop variables
@@ -543,43 +543,43 @@
(symbol_declaration_list
(symbol_declaration
name: [
- (identifier) @parameter
- (accent_quoted (identifier) @parameter)
+ (identifier) @variable.parameter
+ (accent_quoted (identifier) @variable.parameter)
])))
((tuple_deconstruct_declaration
(symbol_declaration
name: [
- (identifier) @parameter
- (accent_quoted (identifier) @parameter)
+ (identifier) @variable.parameter
+ (accent_quoted (identifier) @variable.parameter)
])) @_tuple_decons
(#has-ancestor? @_tuple_decons for))
(concept_declaration
parameters:
(parameter_list [
- (identifier) @parameter
- (accent_quoted (identifier) @parameter)
+ (identifier) @variable.parameter
+ (accent_quoted (identifier) @variable.parameter)
]))
(var_parameter [
- (identifier) @parameter
- (accent_quoted (identifier) @parameter)
+ (identifier) @variable.parameter
+ (accent_quoted (identifier) @variable.parameter)
])
(type_parameter [
- (identifier) @parameter
- (accent_quoted (identifier) @parameter)
+ (identifier) @variable.parameter
+ (accent_quoted (identifier) @variable.parameter)
])
(static_parameter [
- (identifier) @parameter
- (accent_quoted (identifier) @parameter)
+ (identifier) @variable.parameter
+ (accent_quoted (identifier) @variable.parameter)
])
(ref_parameter [
- (identifier) @parameter
- (accent_quoted (identifier) @parameter)
+ (identifier) @variable.parameter
+ (accent_quoted (identifier) @variable.parameter)
])
(pointer_parameter [
- (identifier) @parameter
- (accent_quoted (identifier) @parameter)
+ (identifier) @variable.parameter
+ (accent_quoted (identifier) @variable.parameter)
])
@@ -612,17 +612,17 @@
(pointer_parameter "ptr" @type.qualifier)
; =============================================================================
-; @field ; object and struct fields
+; @variable.member ; object and struct fields
; fields in object/tuple declaration
(field_declaration
(symbol_declaration_list
(symbol_declaration
name: [
- (identifier) @field
- (accent_quoted (identifier) @field)
- (exported_symbol (identifier) @field)
- (exported_symbol (accent_quoted (identifier) @field))
+ (identifier) @variable.member
+ (accent_quoted (identifier) @variable.member)
+ (exported_symbol (identifier) @variable.member)
+ (exported_symbol (accent_quoted (identifier) @variable.member))
])))
; fields in object construction
@@ -630,16 +630,16 @@
(argument_list
(colon_expression
left: [
- (identifier) @field
- (accent_quoted (identifier) @field)
+ (identifier) @variable.member
+ (accent_quoted (identifier) @variable.member)
])))
; fields in tuple construction
(tuple_construction
(colon_expression
left: [
- (identifier) @field
- (accent_quoted (identifier) @field)
+ (identifier) @variable.member
+ (accent_quoted (identifier) @variable.member)
]))
(variant_declaration
@@ -647,10 +647,10 @@
(symbol_declaration_list
(symbol_declaration
name: [
- (identifier) @field
- (accent_quoted (identifier) @field)
- (exported_symbol (identifier) @field)
- (exported_symbol (accent_quoted (identifier) @field))
+ (identifier) @variable.member
+ (accent_quoted (identifier) @variable.member)
+ (exported_symbol (identifier) @variable.member)
+ (exported_symbol (accent_quoted (identifier) @variable.member))
]))))
; =============================================================================
@@ -732,37 +732,37 @@
(nil_literal) @constant.builtin
; =============================================================================
-; @namespace ; modules or namespaces
+; @module ; modules or namespaces
(import_statement
(expression_list
- (identifier) @namespace))
+ (identifier) @module))
(import_statement
(expression_list
(infix_expression
operator: "as"
- right: (identifier) @namespace)))
+ right: (identifier) @module)))
(import_statement
(expression_list
(infix_expression
operator: (operator) @_operator
right: [
- (identifier) @namespace
- (array_construction (identifier) @namespace)
+ (identifier) @module
+ (array_construction (identifier) @module)
]))
(#eq? @_operator "/"))
(import_from_statement
module: (infix_expression
operator: (operator) @_operator
- right: (identifier) @namespace)
+ right: (identifier) @module)
(#eq? @_operator "/"))
(export_statement
(expression_list
- (identifier) @namespace))
+ (identifier) @module))
; =============================================================================
; overrule things
diff --git a/queries/nim_format_string/highlights.scm b/queries/nim_format_string/highlights.scm
index 94a239dfb..b30ecbbef 100644
--- a/queries/nim_format_string/highlights.scm
+++ b/queries/nim_format_string/highlights.scm
@@ -6,10 +6,10 @@
(format_specifiers
colon: (colon) @punctuation.delimiter
- fill_align: (fill_align)? @conditional.ternary
+ fill_align: (fill_align)? @keyword.conditional.ternary
sign: (sign)? @operator
hash: (hash)? @punctuation.special
- zero: (zero)? @field
+ zero: (zero)? @variable.member
min_width: (min_width)? @number
precision: (precision)? @number
type: (type)? @type)
diff --git a/queries/ninja/highlights.scm b/queries/ninja/highlights.scm
index e90169ff3..5f87ff6b5 100644
--- a/queries/ninja/highlights.scm
+++ b/queries/ninja/highlights.scm
@@ -8,7 +8,7 @@
[
"include"
"subninja"
-] @include
+] @keyword.import
[
":"
@@ -39,7 +39,7 @@
;;
;; Paths and Text
;; ==============
-(path) @string.special
+(path) @string.special.path
(text) @string
;;
diff --git a/queries/nix/highlights.scm b/queries/nix/highlights.scm
index 97e5303ba..0f6caf4e2 100644
--- a/queries/nix/highlights.scm
+++ b/queries/nix/highlights.scm
@@ -15,8 +15,8 @@
; exceptions
(variable_expression
- name: (identifier) @exception
- (#any-of? @exception "abort" "throw")
+ name: (identifier) @keyword.exception
+ (#any-of? @keyword.exception "abort" "throw")
(#set! "priority" 101))
; if/then/else
@@ -24,7 +24,7 @@
"if"
"then"
"else"
-] @conditional
+] @keyword.conditional
; field access default (`a.b or c`)
"or" @keyword.operator
@@ -37,7 +37,8 @@
(#set! "priority" 99)) @string
; paths and URLs
-[ (path_expression) (hpath_expression) (spath_expression) (uri_expression) ] @string.special
+[ (path_expression) (hpath_expression) (spath_expression) ] @string.special.path
+(uri_expression) @string.special.url
; escape sequences
(escape_sequence) @string.escape
@@ -61,7 +62,7 @@
; `?` in `{ x ? y }:`, used to set defaults for named function arguments
(formal
- name: (identifier) @parameter
+ name: (identifier) @variable.parameter
"?"? @operator)
; `...` in `{ ... }`, used to ignore unknown named function arguments (see above)
@@ -70,7 +71,7 @@
; universal is the parameter of the function expression
; `:` in `x: y`, used to separate function argument from body (see above)
(function_expression
- universal: (identifier) @parameter
+ universal: (identifier) @variable.parameter
":" @punctuation.special)
; function calls
@@ -82,8 +83,8 @@
(variable_expression) @variable
(variable_expression
- name: (identifier) @include
- (#eq? @include "import"))
+ name: (identifier) @keyword.import
+ (#eq? @keyword.import "import"))
(variable_expression
name: (identifier) @boolean
@@ -115,11 +116,11 @@
(select_expression
expression: (_) @_expr
- attrpath: (attrpath attr: (identifier) @field)
+ attrpath: (attrpath attr: (identifier) @variable.member)
(#not-eq? @_expr "builtins")
)
-(attrset_expression (binding_set (binding . (attrpath (identifier) @field))))
-(rec_attrset_expression (binding_set (binding . (attrpath (identifier) @field))))
+(attrset_expression (binding_set (binding . (attrpath (identifier) @variable.member))))
+(rec_attrset_expression (binding_set (binding . (attrpath (identifier) @variable.member))))
; function definition
(binding
@@ -142,5 +143,5 @@
[
(unary_expression "-" (float_expression))
(float_expression)
-] @float
+] @number.float
diff --git a/queries/nqc/highlights.scm b/queries/nqc/highlights.scm
index 28d101f66..2198426ca 100644
--- a/queries/nqc/highlights.scm
+++ b/queries/nqc/highlights.scm
@@ -7,7 +7,7 @@
[
"until"
-] @repeat
+] @keyword.repeat
[
"acquire"
diff --git a/queries/objc/highlights.scm b/queries/objc/highlights.scm
index c636895f6..129a74e89 100644
--- a/queries/objc/highlights.scm
+++ b/queries/objc/highlights.scm
@@ -3,15 +3,15 @@
; Preprocs
(preproc_undef
- name: (_) @constant) @preproc
+ name: (_) @constant) @keyword.directive
; Includes
-(module_import "@import" @include path: (identifier) @namespace)
+(module_import "@import" @keyword.import path: (identifier) @module)
((preproc_include
- _ @include path: (_))
- (#any-of? @include "#include" "#import"))
+ _ @keyword.import path: (_))
+ (#any-of? @keyword.import "#include" "#import"))
; Type Qualifiers
@@ -31,7 +31,7 @@
"@dynamic"
"volatile"
(protocol_qualifier)
-] @storageclass
+] @keyword.storage
; Keywords
@@ -74,7 +74,7 @@
"@finally"
"__finally"
"@throw"
-] @exception
+] @keyword.exception
; Variables
@@ -91,13 +91,13 @@
"asm"
] @function.builtin
-(method_definition (identifier) @method)
+(method_definition (identifier) @function.method)
-(method_declaration (identifier) @method)
+(method_declaration (identifier) @function.method)
-(method_identifier (identifier)? @method ":" @method (identifier)? @method)
+(method_identifier (identifier)? @function.method ":" @function.method (identifier)? @function.method)
-(message_expression method: (identifier) @method.call)
+(message_expression method: (identifier) @function.method.call)
; Constructors
@@ -154,9 +154,9 @@
(class_declaration (identifier) @type)
-(class_interface "@interface" . (identifier) @type superclass: _? @type category: _? @namespace)
+(class_interface "@interface" . (identifier) @type superclass: _? @type category: _? @module)
-(class_implementation "@implementation" . (identifier) @type superclass: _? @type category: _? @namespace)
+(class_implementation "@implementation" . (identifier) @type superclass: _? @type category: _? @module)
(protocol_forward_declaration (identifier) @type) ; @interface :(
@@ -185,17 +185,17 @@
; Parameters
-(method_parameter ":" @method (identifier) @parameter)
+(method_parameter ":" @function.method (identifier) @variable.parameter)
-(method_parameter declarator: (identifier) @parameter)
+(method_parameter declarator: (identifier) @variable.parameter)
(parameter_declaration
declarator: (function_declarator
declarator: (parenthesized_declarator
(block_pointer_declarator
- declarator: (identifier) @parameter))))
+ declarator: (identifier) @variable.parameter))))
-"..." @parameter.builtin
+"..." @variable.parameter.builtin
; Operators
@@ -207,7 +207,7 @@
(platform) @string.special
-(version_number) @text.uri @number
+(version_number) @string.special
; Punctuation
diff --git a/queries/objdump/highlights.scm b/queries/objdump/highlights.scm
index d23f5a0d9..7532260a6 100644
--- a/queries/objdump/highlights.scm
+++ b/queries/objdump/highlights.scm
@@ -6,26 +6,26 @@
(address)
] @number
-[
- "file" "format"
- "File" "Offset:"
- "discriminator"
-] @text
-"Disassembly of section " @text.title
+; [
+; "file" "format"
+; "File" "Offset:"
+; "discriminator"
+; ] @none
+"Disassembly of section " @markup.heading
-(section_address) @number @text.underline
+(section_address) @string.special
(identifier) @variable
(code_location (identifier) @function.call)
(header (identifier) @keyword)
-(disassembly_section_label (identifier) @namespace)
-(disassembly_section (identifier) @namespace)
+(disassembly_section_label (identifier) @module)
+(disassembly_section (identifier) @module)
-[(file_offset) (discriminator)] @field
+[(file_offset) (discriminator)] @variable.member
-(file_path) @string
+(file_path) @string.special.path
(instruction) @function
-(bad_instruction) @text.warning
+(bad_instruction) @comment.warning
(label) @label
["<" ">"] @punctuation.special
diff --git a/queries/ocaml/highlights.scm b/queries/ocaml/highlights.scm
index e263d833e..d08c8e358 100644
--- a/queries/ocaml/highlights.scm
+++ b/queries/ocaml/highlights.scm
@@ -1,7 +1,7 @@
; Modules
;--------
-[(module_name) (module_type_name)] @namespace
+[(module_name) (module_type_name)] @module
; Types
;------
@@ -23,7 +23,7 @@
[(value_name) (type_variable)] @variable
-(value_pattern) @parameter
+(value_pattern) @variable.parameter
; Functions
;----------
@@ -40,7 +40,7 @@
(external (value_name) @function)
-(method_name) @method
+(method_name) @function.method
; Application
;------------
@@ -107,13 +107,13 @@
["fun" "function" "functor"] @keyword.function
-["if" "then" "else"] @conditional
+["if" "then" "else"] @keyword.conditional
-["exception" "try"] @exception
+["exception" "try"] @keyword.exception
-["include" "open"] @include
+["include" "open"] @keyword.import
-["for" "to" "downto" "while" "do" "done"] @repeat
+["for" "to" "downto" "while" "do" "done"] @keyword.repeat
; Punctuation
;------------
diff --git a/queries/ocamllex/highlights.scm b/queries/ocamllex/highlights.scm
index 248470821..6a5088710 100644
--- a/queries/ocamllex/highlights.scm
+++ b/queries/ocamllex/highlights.scm
@@ -23,7 +23,7 @@
; Rules
(lexer_entry_name) @function
-(lexer_argument) @parameter
+(lexer_argument) @variable.parameter
(lexer_entry ["=" "|"] @punctuation.delimiter)
diff --git a/queries/odin/highlights.scm b/queries/odin/highlights.scm
index 6b06153f3..38896cbfc 100644
--- a/queries/odin/highlights.scm
+++ b/queries/odin/highlights.scm
@@ -3,14 +3,14 @@
[
(calling_convention)
(tag)
-] @preproc
+] @keyword.directive
; Includes
[
"import"
"package"
-] @include
+] @keyword.import
; Keywords
@@ -41,7 +41,7 @@
[
"distinct"
"dynamic"
-] @storageclass
+] @keyword.storage
; Conditionals
@@ -54,7 +54,7 @@
"where"
"break"
(fallthrough_statement)
-] @conditional
+] @keyword.conditional
((ternary_expression
[
@@ -63,7 +63,7 @@
"if"
"else"
"when"
- ] @conditional.ternary)
+ ] @keyword.conditional.ternary)
(#set! "priority" 105))
; Repeats
@@ -72,7 +72,7 @@
"for"
"do"
"continue"
-] @repeat
+] @keyword.repeat
; Variables
@@ -80,23 +80,23 @@
; Namespaces
-(package_declaration (identifier) @namespace)
+(package_declaration (identifier) @module)
-(import_declaration alias: (identifier) @namespace)
+(import_declaration alias: (identifier) @module)
-(foreign_block (identifier) @namespace)
+(foreign_block (identifier) @module)
-(using_statement (identifier) @namespace)
+(using_statement (identifier) @module)
; Parameters
-(parameter (identifier) @parameter ":" "="? (identifier)? @constant)
+(parameter (identifier) @variable.parameter ":" "="? (identifier)? @constant)
-(default_parameter (identifier) @parameter ":=")
+(default_parameter (identifier) @variable.parameter ":=")
-(named_type (identifier) @parameter)
+(named_type (identifier) @variable.parameter)
-(call_expression argument: (identifier) @parameter "=")
+(call_expression argument: (identifier) @variable.parameter "=")
; Functions
@@ -138,7 +138,7 @@
(struct . (identifier) @type)
-(field_type . (identifier) @namespace "." (identifier) @type)
+(field_type . (identifier) @module "." (identifier) @type)
(bit_set_type (identifier) @type ";")
@@ -152,13 +152,13 @@
; Fields
-(member_expression "." (identifier) @field)
+(member_expression "." (identifier) @variable.member)
-(struct_type "{" (identifier) @field)
+(struct_type "{" (identifier) @variable.member)
-(struct_field (identifier) @field "="?)
+(struct_field (identifier) @variable.member "="?)
-(field (identifier) @field)
+(field (identifier) @variable.member)
; Constants
@@ -187,7 +187,7 @@
(number) @number
-(float) @float
+(float) @number.float
(string) @string
diff --git a/queries/pascal/highlights.scm b/queries/pascal/highlights.scm
index e11e0eaa2..088465545 100644
--- a/queries/pascal/highlights.scm
+++ b/queries/pascal/highlights.scm
@@ -72,13 +72,13 @@
(kWhile)
(kRepeat)
(kUntil)
-] @repeat
+] @keyword.repeat
[
(kIf)
(kThen)
(kElse)
-] @conditional
+] @keyword.conditional
[
(kPublished)
@@ -95,9 +95,9 @@
(kPacked)
(kAbsolute)
-] @storageclass
+] @keyword.storage
-(kUses) @include
+(kUses) @keyword.import
; -- Attributes
@@ -278,7 +278,7 @@
(comment) @comment.documentation
. (declVar))
-(pp) @preproc
+(pp) @keyword.directive
; -- Type declaration
@@ -304,11 +304,11 @@
; -- Function parameters
-(declArg name: (identifier) @parameter)
+(declArg name: (identifier) @variable.parameter)
; -- Template parameters
-(genericArg name: (identifier) @parameter)
+(genericArg name: (identifier) @variable.parameter)
(genericArg type: (typeref) @type)
(declProc name: (genericDot lhs: (identifier) @type))
@@ -322,7 +322,7 @@
; -- Exception parameters
-(exceptionHandler variable: (identifier) @parameter)
+(exceptionHandler variable: (identifier) @variable.parameter)
; -- Type usage
@@ -394,10 +394,10 @@
(#lua-match? @keyword.return "^[eE][xX][iI][tT]$")))
(statement (exprCall entity: ((identifier) @keyword.return
(#lua-match? @keyword.return "^[eE][xX][iI][tT]$"))))
-(statement ((identifier) @repeat
- (#lua-match? @repeat "^[bB][rR][eE][aA][kK]$")))
-(statement ((identifier) @repeat
- (#lua-match? @repeat "^[cC][oO][nN][tT][iI][nN][uU][eE]$")))
+(statement ((identifier) @keyword.repeat
+ (#lua-match? @keyword.repeat "^[bB][rR][eE][aA][kK]$")))
+(statement ((identifier) @keyword.repeat
+ (#lua-match? @keyword.repeat "^[cC][oO][nN][tT][iI][nN][uU][eE]$")))
; -- Identifier type inference
diff --git a/queries/passwd/highlights.scm b/queries/passwd/highlights.scm
index 3e078a123..51bb8fc5f 100644
--- a/queries/passwd/highlights.scm
+++ b/queries/passwd/highlights.scm
@@ -1,12 +1,12 @@
-(user) @namespace
+(user) @module
-(auth) @symbol
+(auth) @string.special.symbol
(gecos) @string
-(home) @text.uri @constant
+(home) @string.special.path
-(shell) @text.uri @string.special
+(shell) @string.special.path
[
(gid)
diff --git a/queries/perl/highlights.scm b/queries/perl/highlights.scm
index e3aa0b2bb..7a0c4e530 100644
--- a/queries/perl/highlights.scm
+++ b/queries/perl/highlights.scm
@@ -1,13 +1,13 @@
-((source_file . (comment) @preproc)
- (#lua-match? @preproc "^#!/"))
+((source_file . (comment) @keyword.directive)
+ (#lua-match? @keyword.directive "^#!/"))
-[ "use" "no" "require" ] @include
+[ "use" "no" "require" ] @keyword.import
-[ "if" "elsif" "unless" "else" ] @conditional
+[ "if" "elsif" "unless" "else" ] @keyword.conditional
-(conditional_expression [ "?" ":" ] @conditional.ternary)
+(conditional_expression [ "?" ":" ] @keyword.conditional.ternary)
-[ "while" "until" "for" "foreach" ] @repeat
+[ "while" "until" "for" "foreach" ] @keyword.repeat
"return" @keyword.return
@@ -15,7 +15,7 @@
[ "map" "grep" "sort" ] @function.builtin
-"package" @include
+"package" @keyword.import
[
"do"
@@ -27,7 +27,7 @@
(_ operator: _ @operator)
"\\" @operator
-(yadayada) @exception
+(yadayada) @keyword.exception
(phaser_statement phase: _ @keyword.phaser)
@@ -37,10 +37,10 @@
"isa"
] @keyword.operator
-(eof_marker) @preproc
+(eof_marker) @keyword.directive
(data_section) @comment
-(pod) @text
+(pod) @none
[
(number)
@@ -70,7 +70,7 @@
(quoted_regexp)
(match_regexp)
(regexp_content)
-] @string.regex
+] @string.regexp
(autoquoted_bareword) @string.special
@@ -89,7 +89,7 @@
(relational_expression operator: "isa" right: (bareword) @type)
(function_call_expression (function) @function.call)
-(method_call_expression (method) @method.call)
+(method_call_expression (method) @function.method.call)
(method_call_expression invocant: (bareword) @type)
(func0op_call_expression function: _ @function.builtin)
diff --git a/queries/php/highlights.scm b/queries/php/highlights.scm
index 427ab4838..aa3be62b9 100644
--- a/queries/php/highlights.scm
+++ b/queries/php/highlights.scm
@@ -59,7 +59,7 @@
(list_literal "list" @function.builtin)
(method_declaration
- name: (name) @method)
+ name: (name) @function.method)
(function_call_expression
function: (qualified_name (name) @function.call))
@@ -71,13 +71,13 @@
name: (name) @function.call)
(member_call_expression
- name: (name) @method.call)
+ name: (name) @function.method.call)
(function_definition
name: (name) @function)
(nullsafe_member_call_expression
- name: (name) @method)
+ name: (name) @function.method)
(method_declaration
name: (name) @constructor
@@ -90,10 +90,10 @@
[
(simple_parameter)
(variadic_parameter)
-] @parameter
+] @variable.parameter
(argument
- (name) @parameter)
+ (name) @variable.parameter)
; Member
@@ -115,18 +115,18 @@
; Namespace
(namespace_definition
- name: (namespace_name (name) @namespace))
+ name: (namespace_name (name) @module))
(namespace_name_as_prefix
- (namespace_name (name) @namespace))
+ (namespace_name (name) @module))
; Attributes
(attribute_list) @attribute
; Conditions ( ? : )
-(conditional_expression) @conditional
+(conditional_expression) @keyword.conditional
; Directives
-(declare_directive ["strict_types" "ticks" "encoding"] @parameter)
+(declare_directive ["strict_types" "ticks" "encoding"] @variable.parameter)
; Basic tokens
@@ -149,7 +149,7 @@
(boolean) @boolean
(null) @constant.builtin
(integer) @number
-(float) @float
+(float) @number.float
(comment) @comment @spell
(named_label_statement) @label
@@ -215,7 +215,7 @@
"switch"
"match"
"??"
- ] @conditional
+ ] @keyword.conditional
[
"continue"
@@ -226,14 +226,14 @@
"for"
"foreach"
"while"
- ] @repeat
+ ] @keyword.repeat
[
"catch"
"finally"
"throw"
"try"
- ] @exception
+ ] @keyword.exception
[
"include_once"
@@ -241,7 +241,7 @@
"require_once"
"require"
"use"
- ] @include
+ ] @keyword.import
[
","
diff --git a/queries/phpdoc/highlights.scm b/queries/phpdoc/highlights.scm
index 08ff9e1cb..a30409314 100644
--- a/queries/phpdoc/highlights.scm
+++ b/queries/phpdoc/highlights.scm
@@ -1,7 +1,7 @@
(tag_name) @attribute @nospell
(tag
(tag_name) @_tag (#eq? @_tag "@param")
- (variable_name) @parameter
+ (variable_name) @variable.parameter
)
(tag
(tag_name) @_tag (#eq? @_tag "@property")
@@ -12,11 +12,11 @@
(variable_name) @variable
)
(tag
- (tag_name) @_tag (#eq? @_tag "@method")
- (name) @method
+ (tag_name) @_tag (#eq? @_tag "@function.method")
+ (name) @function.method
)
(parameter
- (variable_name) @parameter)
+ (variable_name) @variable.parameter)
(type_list
[
(array_type)
@@ -27,14 +27,14 @@
(type_list) @nospell
(variable_name) @nospell
(tag
- (description (text) @text))
+ (description (text) @none @spell))
(tag
[
(author_name)
(version)
- ] @text)
+ ] @none)
(tag
- (email_address) @text.uri
+ (email_address) @string.special.url
)
(type_list "|" @keyword)
diff --git a/queries/pioasm/highlights.scm b/queries/pioasm/highlights.scm
index 055f745b4..6d0479b37 100644
--- a/queries/pioasm/highlights.scm
+++ b/queries/pioasm/highlights.scm
@@ -21,9 +21,9 @@
[ "block" "noblock" "rel" ] @attribute
-[ "iffull" "ifempty" ] @conditional
+[ "iffull" "ifempty" ] @keyword.conditional
-"public" @storageclass
+"public" @keyword.storage
(integer) @number
@@ -31,4 +31,4 @@
(directive (symbol_def (identifier) @variable))
(value (identifier) @variable)
-(directive directive: _ @preproc)
+(directive directive: _ @keyword.directive)
diff --git a/queries/po/highlights.scm b/queries/po/highlights.scm
index 307e32059..d799d692b 100644
--- a/queries/po/highlights.scm
+++ b/queries/po/highlights.scm
@@ -26,4 +26,4 @@
(comment (reference (text) @string.special.path))
-(comment (flag (text) @preproc))
+(comment (flag (text) @keyword.directive))
diff --git a/queries/pod/highlights.scm b/queries/pod/highlights.scm
index e1e88f5f8..e5a192620 100644
--- a/queries/pod/highlights.scm
+++ b/queries/pod/highlights.scm
@@ -12,7 +12,7 @@
(command_paragraph
(command) @keyword
(#lua-match? @keyword "^=head")
- (content) @text.title)
+ (content) @markup.heading)
(command_paragraph
(command) @keyword
@@ -22,7 +22,7 @@
(command_paragraph
(command) @keyword
(#lua-match? @keyword "^=item")
- (content) @text)
+ (content) @none)
(command_paragraph
(command) @keyword
@@ -30,7 +30,7 @@
(content) @string.special)
-(verbatim_paragraph (content) @text.literal)
+(verbatim_paragraph (content) @markup.raw)
(interior_sequence
(sequence_letter) @character
@@ -40,32 +40,32 @@
(interior_sequence
(sequence_letter) @character
(#eq? @character "B")
- (content) @text.strong)
+ (content) @markup.strong)
(interior_sequence
(sequence_letter) @character
(#eq? @character "C")
- (content) @text.literal)
+ (content) @markup.raw)
(interior_sequence
(sequence_letter) @character
(#eq? @character "F")
- (content) @text.underline @string.special)
+ (content) @string.special.path)
(interior_sequence
(sequence_letter) @character
(#eq? @character "I")
- (content) @text.emphasis)
+ (content) @markup.italic)
(interior_sequence
(sequence_letter) @character
(#eq? @character "L")
- (content) @text.uri)
+ (content) @string.special.url)
(interior_sequence
(sequence_letter) @character
(#eq? @character "X")
- (content) @text.reference)
+ (content) @markup.link)
(interior_sequence
(sequence_letter) @character
diff --git a/queries/poe_filter/highlights.scm b/queries/poe_filter/highlights.scm
index 3b233a7d8..7db71d279 100644
--- a/queries/poe_filter/highlights.scm
+++ b/queries/poe_filter/highlights.scm
@@ -1,8 +1,8 @@
-["Show" "Hide" "Minimal"] @namespace
+["Show" "Hide" "Minimal"] @module
-["Import" "Optional"] @include
+["Import" "Optional"] @keyword.import
-(condition (name) @conditional)
+(condition (name) @keyword.conditional)
(action (name) @keyword)
(continue) @label
@@ -10,7 +10,7 @@
(string) @string
-(file) @string.special
+(file) @string.special.path
[
(quality)
diff --git a/queries/pony/highlights.scm b/queries/pony/highlights.scm
index 18c3975ea..1d0c86c35 100644
--- a/queries/pony/highlights.scm
+++ b/queries/pony/highlights.scm
@@ -2,7 +2,7 @@
[
"use"
-] @include
+] @keyword.import
; Keywords
@@ -68,13 +68,13 @@
"else"
"elseif"
"match"
-] @conditional
+] @keyword.conditional
-(if_statement "end" @conditional)
+(if_statement "end" @keyword.conditional)
-(iftype_statement "end" @conditional)
+(iftype_statement "end" @keyword.conditional)
-(match_statement "end" @conditional)
+(match_statement "end" @keyword.conditional)
; Repeats
@@ -86,11 +86,11 @@
"continue"
"do"
"break"
-] @repeat
+] @keyword.repeat
-(do_block "end" @repeat)
+(do_block "end" @keyword.repeat)
-(repeat_statement "end" @repeat)
+(repeat_statement "end" @keyword.repeat)
; Exceptions
@@ -98,11 +98,11 @@
"try"
(error)
"compile_error"
-] @exception
+] @keyword.exception
-(try_statement "end" @exception)
+(try_statement "end" @keyword.exception)
-(recover_statement "end" @exception)
+(recover_statement "end" @keyword.exception)
; Attributes
@@ -116,9 +116,9 @@
; Fields
-(field name: (identifier) @field)
+(field name: (identifier) @variable.member)
-(member_expression "." (identifier) @field)
+(member_expression "." (identifier) @variable.member)
; Constructors
@@ -126,11 +126,11 @@
; Methods
-(method (identifier) @method)
+(method (identifier) @function.method)
-(behavior (identifier) @method)
+(behavior (identifier) @function.method)
-(ffi_method (identifier) @method)
+(ffi_method (identifier) @function.method)
((ffi_method (string) @string.special)
(#set! "priority" 105))
@@ -138,15 +138,15 @@
(call_expression
callee:
[
- (identifier) @method.call
- (ffi_identifier (identifier) @method.call)
- (member_expression "." (identifier) @method.call)
+ (identifier) @function.method.call
+ (ffi_identifier (identifier) @function.method.call)
+ (member_expression "." (identifier) @function.method.call)
])
; Parameters
-(parameter name: (identifier) @parameter)
-(lambda_parameter name: (identifier) @parameter)
+(parameter name: (identifier) @variable.parameter)
+(lambda_parameter name: (identifier) @variable.parameter)
; Types
@@ -156,7 +156,7 @@
(generic_parameter (identifier) @type)
-(lambda_type (identifier)? @method)
+(lambda_type (identifier)? @function.method)
((identifier) @type
(#lua-match? @type "^_*[A-Z][a-zA-Z0-9_]*$"))
@@ -250,7 +250,7 @@
(number) @number
-(float) @float
+(float) @number.float
(boolean) @boolean
diff --git a/queries/promql/highlights.scm b/queries/promql/highlights.scm
index 47038034a..d0af0356c 100644
--- a/queries/promql/highlights.scm
+++ b/queries/promql/highlights.scm
@@ -25,15 +25,15 @@
")"
] @punctuation.bracket
-(float_literal) @float
+(float_literal) @number.float
(string_literal) @string
(metric_name) @type
-(range_selection) @text.strong @type
-(subquery_range_selection) @text.strong @type
+(range_selection) @type
+(subquery_range_selection) @type
-(label_name) @field
-(label_value) @text.underline @string.regex
+(label_name) @variable.member
+(label_value) @string.regexp
(function_name) @function.call
diff --git a/queries/proto/highlights.scm b/queries/proto/highlights.scm
index e869b87e0..f3715d5db 100644
--- a/queries/proto/highlights.scm
+++ b/queries/proto/highlights.scm
@@ -28,7 +28,7 @@
[
"package"
"import"
-] @include
+] @keyword.import
[
(key_type)
@@ -51,7 +51,7 @@
(int_lit) @number
-(float_lit) @float
+(float_lit) @number.float
[
(true)
diff --git a/queries/prql/highlights.scm b/queries/prql/highlights.scm
index 92f74f089..587e8f070 100644
--- a/queries/prql/highlights.scm
+++ b/queries/prql/highlights.scm
@@ -20,9 +20,9 @@
(keyword_from_text)
] @keyword
-(keyword_loop) @repeat
+(keyword_loop) @keyword.repeat
-(keyword_case) @conditional
+(keyword_case) @keyword.conditional
[
(literal_string)
@@ -31,9 +31,9 @@
] @string
(assignment
- alias: (field) @field)
+ alias: (field) @variable.member)
-alias: (identifier) @field
+alias: (identifier) @variable.member
(comment) @comment @spell
@@ -75,7 +75,7 @@ alias: (identifier) @field
(integer) @number
-(decimal_number) @float
+(decimal_number) @number.float
[
(keyword_min)
@@ -123,7 +123,7 @@ alias: (identifier) @field
(keyword_full)
(keyword_csv)
(keyword_json)
-] @method.call
+] @function.method.call
[
(keyword_true)
@@ -139,7 +139,7 @@ alias: (identifier) @field
name: (identifier) @function)
(parameter
- (identifier) @parameter)
+ (identifier) @variable.parameter)
(variable
(keyword_let)
diff --git a/queries/pug/highlights.scm b/queries/pug/highlights.scm
index 57667885a..cdd9d1d83 100644
--- a/queries/pug/highlights.scm
+++ b/queries/pug/highlights.scm
@@ -18,7 +18,7 @@
(id) @constant
(class) @property
-(doctype) @preproc
+(doctype) @keyword.directive
(content) @none
@@ -33,22 +33,22 @@
(#match? @keyword "^(:|v-bind|v-|\\@)"))
(quoted_attribute_value) @string
-(include (keyword) @include)
-(extends (keyword) @include)
-(filename) @string.special
+(include (keyword) @keyword.import)
+(extends (keyword) @keyword.import)
+(filename) @string.special.path
(block_definition (keyword) @keyword)
(block_append (keyword)+ @keyword)
(block_prepend (keyword)+ @keyword)
(block_name) @type
-(conditional (keyword) @conditional)
+(conditional (keyword) @keyword.conditional)
(case
- (keyword) @conditional
- (when (keyword) @conditional)+)
+ (keyword) @keyword.conditional
+ (when (keyword) @keyword.conditional)+)
-(each (keyword) @repeat)
-(while (keyword) @repeat)
+(each (keyword) @keyword.repeat)
+(while (keyword) @keyword.repeat)
(mixin_use
"+" @punctuation.delimiter
@@ -57,14 +57,14 @@
(keyword) @keyword.function
(mixin_name) @function)
(mixin_attributes
- (attribute_name) @parameter)
+ (attribute_name) @variable.parameter)
(filter
":" @punctuation.delimiter
- (filter_name) @method.call)
+ (filter_name) @function.method.call)
(filter
(attributes
- (attribute (attribute_name) @parameter)))
+ (attribute (attribute_name) @variable.parameter)))
[
"(" ")"
diff --git a/queries/puppet/highlights.scm b/queries/puppet/highlights.scm
index 196aa9dbd..aaf5dac39 100644
--- a/queries/puppet/highlights.scm
+++ b/queries/puppet/highlights.scm
@@ -4,7 +4,7 @@
; Includes
-"include" @include
+"include" @keyword.import
(include_statement (identifier) @type)
@@ -31,9 +31,9 @@
"else"
"unless"
"case"
-] @conditional
+] @keyword.conditional
-(default_case "default" @conditional)
+(default_case "default" @keyword.conditional)
; Properties
@@ -42,13 +42,13 @@
; Parameters
-(lambda (variable (identifier) @parameter))
+(lambda (variable (identifier) @variable.parameter))
-(parameter (variable (identifier) @parameter))
+(parameter (variable (identifier) @variable.parameter))
-(function_call (identifier) @parameter)
+(function_call (identifier) @variable.parameter)
-(method_call (identifier) @parameter)
+(method_call (identifier) @variable.parameter)
; Functions
@@ -64,16 +64,16 @@
; Methods
(function_declaration
- "function" . (class_identifier (identifier) @method . ))
+ "function" . (class_identifier (identifier) @function.method . ))
(function_call
- (class_identifier (identifier) @method.call . ))
+ (class_identifier (identifier) @function.method.call . ))
(defined_resource_type
- "define" . (class_identifier (identifier) @method . ))
+ "define" . (class_identifier (identifier) @function.method . ))
(method_call
- "." . (identifier) @method.call)
+ "." . (identifier) @function.method.call)
; Types
@@ -104,7 +104,7 @@
; "Namespaces"
-(class_identifier . (identifier) @namespace)
+(class_identifier . (identifier) @module)
; Operators
@@ -171,13 +171,13 @@
(number) @number
-(float) @float
+(float) @number.float
(string) @string
(escape_sequence) @string.escape
-(regex) @string.regex
+(regex) @string.regexp
(boolean) @boolean
diff --git a/queries/purescript/highlights.scm b/queries/purescript/highlights.scm
index 3e3ec3cb8..247ea839e 100644
--- a/queries/purescript/highlights.scm
+++ b/queries/purescript/highlights.scm
@@ -5,7 +5,7 @@
(integer)
(exp_negation)
] @number
- (exp_literal (number)) @float
+ (exp_literal (number)) @number.float
(char) @character
[
(string)
@@ -43,12 +43,12 @@
"else"
"case"
"of"
- ] @conditional
+ ] @keyword.conditional
[
"import"
"module"
- ] @include
+ ] @keyword.import
[
(operator)
@@ -74,10 +74,10 @@
] @operator
(qualified_module (module) @constructor)
- (module) @namespace
- (qualified_type (module) @namespace)
- (qualified_variable (module) @namespace)
- (import (module) @namespace)
+ (module) @module
+ (qualified_type (module) @module)
+ (qualified_variable (module) @module)
+ (import (module) @module)
[
(where)
@@ -111,7 +111,7 @@
; `_` wildcards in if-then-else and case-of expressions,
; as well as record updates and operator sections
- (wildcard) @parameter
+ (wildcard) @variable.parameter
; ----------------------------------------------------------------------------
; Functions and variables
@@ -120,10 +120,10 @@
(exp_apply . (exp_name (variable) @function))
(exp_apply . (exp_name (qualified_variable (variable) @function)))
- (row_field (field_name) @field)
- (record_field (field_name) @field)
- (record_accessor (variable) @field)
- (exp_record_access (variable) @field)
+ (row_field (field_name) @variable.member)
+ (record_field (field_name) @variable.member)
+ (record_accessor (variable) @variable.member)
+ (exp_record_access (variable) @variable.member)
(signature name: (variable) @type)
(kind_declaration (class_name) @type)
diff --git a/queries/python/highlights.scm b/queries/python/highlights.scm
index 5b0301d21..9ba1fcf14 100644
--- a/queries/python/highlights.scm
+++ b/queries/python/highlights.scm
@@ -30,8 +30,8 @@
"_" @constant.builtin ; match wildcard
((attribute
- attribute: (identifier) @field)
- (#lua-match? @field "^[%l_].*$"))
+ attribute: (identifier) @variable.member)
+ (#lua-match? @variable.member "^[%l_].*$"))
((assignment
left: (identifier) @type.definition
@@ -51,7 +51,7 @@
(call
function: (attribute
- attribute: (identifier) @method.call))
+ attribute: (identifier) @function.method.call))
((call
function: (identifier) @constructor)
@@ -113,36 +113,36 @@
;; Normal parameters
(parameters
- (identifier) @parameter)
+ (identifier) @variable.parameter)
;; Lambda parameters
(lambda_parameters
- (identifier) @parameter)
+ (identifier) @variable.parameter)
(lambda_parameters
(tuple_pattern
- (identifier) @parameter))
+ (identifier) @variable.parameter))
; Default parameters
(keyword_argument
- name: (identifier) @parameter)
+ name: (identifier) @variable.parameter)
; Naming parameters on call-site
(default_parameter
- name: (identifier) @parameter)
+ name: (identifier) @variable.parameter)
(typed_parameter
- (identifier) @parameter)
+ (identifier) @variable.parameter)
(typed_default_parameter
- name: (identifier) @parameter)
+ name: (identifier) @variable.parameter)
; Variadic parameters *args, **kwargs
(parameters
(list_splat_pattern ; *args
- (identifier) @parameter))
+ (identifier) @variable.parameter))
(parameters
(dictionary_splat_pattern ; **kwargs
- (identifier) @parameter))
+ (identifier) @variable.parameter))
(lambda_parameters
(list_splat_pattern
- (identifier) @parameter))
+ (identifier) @variable.parameter))
(lambda_parameters
(dictionary_splat_pattern
- (identifier) @parameter))
+ (identifier) @variable.parameter))
;; Literals
@@ -155,12 +155,12 @@
(#eq? @variable.builtin "cls"))
(integer) @number
-(float) @float
+(float) @number.float
(comment) @comment @spell
-((module . (comment) @preproc)
- (#lua-match? @preproc "^#!/"))
+((module . (comment) @keyword.directive)
+ (#lua-match? @keyword.directive "^#!/"))
(string) @string
[
@@ -267,16 +267,16 @@
(yield "from" @keyword.return)
(future_import_statement
- "from" @include
+ "from" @keyword.import
"__future__" @constant.builtin)
-(import_from_statement "from" @include)
-"import" @include
+(import_from_statement "from" @keyword.import)
+"import" @keyword.import
-(aliased_import "as" @include)
+(aliased_import "as" @keyword.import)
-["if" "elif" "else" "match" "case"] @conditional
+["if" "elif" "else" "match" "case"] @keyword.conditional
-["for" "while" "break" "continue"] @repeat
+["for" "while" "break" "continue"] @keyword.repeat
[
"try"
@@ -284,13 +284,13 @@
"except*"
"raise"
"finally"
-] @exception
+] @keyword.exception
-(raise_statement "from" @exception)
+(raise_statement "from" @keyword.exception)
(try_statement
(else_clause
- "else" @exception))
+ "else" @keyword.exception))
["(" ")" "[" "]" "{" "}"] @punctuation.bracket
@@ -309,7 +309,7 @@
(class_definition
body: (block
(function_definition
- name: (identifier) @method)))
+ name: (identifier) @function.method)))
(class_definition
superclasses: (argument_list
@@ -319,15 +319,15 @@
body: (block
(expression_statement
(assignment
- left: (identifier) @field))))
- (#lua-match? @field "^%l.*$"))
+ left: (identifier) @variable.member))))
+ (#lua-match? @variable.member "^%l.*$"))
((class_definition
body: (block
(expression_statement
(assignment
left: (_
- (identifier) @field)))))
- (#lua-match? @field "^%l.*$"))
+ (identifier) @variable.member)))))
+ (#lua-match? @variable.member "^%l.*$"))
((class_definition
(block
@@ -358,5 +358,5 @@
(call
function: (attribute
object: (identifier) @_re)
- arguments: (argument_list . (string (string_content) @string.regex))
+ arguments: (argument_list . (string (string_content) @string.regexp))
(#eq? @_re "re"))
diff --git a/queries/ql/highlights.scm b/queries/ql/highlights.scm
index dcc702263..d7d9500b0 100644
--- a/queries/ql/highlights.scm
+++ b/queries/ql/highlights.scm
@@ -39,18 +39,18 @@
"strictsum"
] @function.builtin
-"import" @include
+"import" @keyword.import
[
"if"
"then"
"else"
-] @conditional
+] @keyword.conditional
[
"forall"
"forex"
-] @repeat
+] @keyword.repeat
[
"asc"
@@ -106,8 +106,8 @@
"|"
] @punctuation.delimiter
-(moduleExpr (simpleId) @namespace)
-(module name: (moduleName) @namespace)
+(moduleExpr (simpleId) @module)
+(module name: (moduleName) @module)
(dataclass name: (className) @type)
(typeExpr name: (className) @type)
@@ -118,7 +118,7 @@
(varName) @variable
(integer) @number
-(float) @float
+(float) @number.float
(string) @string
diff --git a/queries/qmldir/highlights.scm b/queries/qmldir/highlights.scm
index 1fd174708..a716e8c9e 100644
--- a/queries/qmldir/highlights.scm
+++ b/queries/qmldir/highlights.scm
@@ -1,6 +1,6 @@
; Preproc
-(command (identifier) @preproc)
+(command (identifier) @keyword.directive)
; Keywords
@@ -10,7 +10,7 @@
(number) @number
-(float) @float
+(float) @number.float
; Variables
diff --git a/queries/qmljs/highlights.scm b/queries/qmljs/highlights.scm
index 40008aad9..0b15f46cf 100644
--- a/queries/qmljs/highlights.scm
+++ b/queries/qmljs/highlights.scm
@@ -1,6 +1,6 @@
; inherits: ecma
-"pragma" @include
+"pragma" @keyword.import
;;; Annotations
@@ -61,7 +61,7 @@
;;; namespace
(nested_identifier
(nested_identifier
- (identifier) @namespace)
+ (identifier) @module)
)
; Properties
@@ -100,7 +100,7 @@
(template_string)
] @string
-(regex) @string.regex
+(regex) @string.regexp
(number) @number
; Tokens
diff --git a/queries/query/highlights.scm b/queries/query/highlights.scm
index ccf13a6c8..030e3d44f 100644
--- a/queries/query/highlights.scm
+++ b/queries/query/highlights.scm
@@ -27,15 +27,15 @@
((parameters (identifier) @number)
(#match? @number "^[-+]?[0-9]+(.[0-9]+)?$"))
-((program . (comment)* . (comment) @include)
- (#lua-match? @include "^;+ *inherits *:"))
+((program . (comment)* . (comment) @keyword.import)
+ (#lua-match? @keyword.import "^;+ *inherits *:"))
-((program . (comment)* . (comment) @preproc)
- (#lua-match? @preproc "^;+ *extends *$"))
+((program . (comment)* . (comment) @keyword.directive)
+ (#lua-match? @keyword.directive "^;+ *extends *$"))
((predicate
name: (identifier) @_name
- parameters: (parameters (string "\"" @string "\"" @string) @string.regex))
+ parameters: (parameters (string "\"" @string "\"" @string) @string.regexp))
(#any-of? @_name
"match"
"not-match"
@@ -46,5 +46,5 @@
((predicate
name: (identifier) @_name
- parameters: (parameters (string "\"" @string "\"" @string) @string.regex . (string) .))
+ parameters: (parameters (string "\"" @string "\"" @string) @string.regexp . (string) .))
(#any-of? @_name "gsub" "not-gsub"))
diff --git a/queries/r/highlights.scm b/queries/r/highlights.scm
index 9d837ba83..03cf01bd7 100755
--- a/queries/r/highlights.scm
+++ b/queries/r/highlights.scm
@@ -3,7 +3,7 @@
; Literals
(integer) @number
-(float) @float
+(float) @number.float
(complex) @number
@@ -12,29 +12,29 @@
(comment) @comment @spell
-((program . (comment) @preproc)
- (#lua-match? @preproc "^#!/"))
+((program . (comment) @keyword.directive)
+ (#lua-match? @keyword.directive "^#!/"))
(identifier) @variable
((dollar (identifier) @variable.builtin)
(#eq? @variable.builtin "self"))
-((dollar _ (identifier) @field))
+((dollar _ (identifier) @variable.member))
; Parameters
-(formal_parameters (identifier) @parameter)
+(formal_parameters (identifier) @variable.parameter)
(formal_parameters
- (default_parameter name: (identifier) @parameter))
+ (default_parameter name: (identifier) @variable.parameter))
-(default_argument name: (identifier) @parameter)
+(default_argument name: (identifier) @variable.parameter)
; Namespace
-(namespace_get namespace: (identifier) @namespace)
-(namespace_get_internal namespace: (identifier) @namespace)
+(namespace_get namespace: (identifier) @module)
+(namespace_get_internal namespace: (identifier) @module)
; Operators
[
@@ -111,14 +111,14 @@
"if"
"else"
"switch"
-] @conditional
+] @keyword.conditional
[
"while"
"repeat"
"for"
"in"
-] @repeat
+] @keyword.repeat
[
(true)
@@ -138,4 +138,4 @@
(namespace_get_internal function: (identifier) @function.call))
(call
- function: ((dollar _ (identifier) @method.call)))
+ function: ((dollar _ (identifier) @function.method.call)))
diff --git a/queries/racket/highlights.scm b/queries/racket/highlights.scm
index 4448397ae..fdd392077 100644
--- a/queries/racket/highlights.scm
+++ b/queries/racket/highlights.scm
@@ -11,7 +11,7 @@
(number) @number
(character) @character
(boolean) @boolean
-(keyword) @symbol
+(keyword) @string.special.symbol
;; string ;;
@@ -21,7 +21,7 @@
(escape_sequence) @string.escape
-(regex) @string.regex
+(regex) @string.regexp
;; comment ;;
@@ -46,7 +46,7 @@
;; quote ;;
-(quote) @symbol
+(quote) @string.special.symbol
;; list ;;
@@ -125,14 +125,14 @@
(list
.
- (symbol) @include
- (#eq? @include "require")
+ (symbol) @keyword.import
+ (#eq? @keyword.import "require")
(#set! "priority" 101))
(quote
.
(symbol)
- (#set! "priority" 105)) @symbol
+ (#set! "priority" 105)) @string.special.symbol
((sexp_comment) @comment
(#set! "priority" 110))
diff --git a/queries/rasi/highlights.scm b/queries/rasi/highlights.scm
index 6485a5f9e..7385e3245 100644
--- a/queries/rasi/highlights.scm
+++ b/queries/rasi/highlights.scm
@@ -1,8 +1,8 @@
(comment) @comment @spell
"@media" @keyword
-"@import" @include
-"@theme" @include
+"@import" @keyword.import
+"@theme" @keyword.import
(string_value) @string
[
@@ -62,7 +62,7 @@
[
(global_selector)
(id_selector)
- ] @namespace
+ ] @module
(id_selector_view [ "normal" "selected" "alternate" ] @attribute)
(id_selector_state [ "normal" "urgent" "active" ] @type.qualifier)
diff --git a/queries/rbs/highlights.scm b/queries/rbs/highlights.scm
index e985e8e0a..4e46680a3 100644
--- a/queries/rbs/highlights.scm
+++ b/queries/rbs/highlights.scm
@@ -51,7 +51,7 @@
(constant)
(operator)
(setter)
- ] @method))
+ ] @function.method))
[(ivar_name) (cvar_name)] @property
@@ -62,7 +62,7 @@
(interface_name (interface) @type)
(alias_name (identifier) @type)
(type_variable) @constant
-(namespace (constant) @namespace)
+(namespace (constant) @module)
(builtin_type) @type.builtin
@@ -70,16 +70,16 @@
(global_name) @property
; Standard Arguments
-(parameter (var_name) @parameter)
+(parameter (var_name) @variable.parameter)
; Keyword Arguments
-(keyword) @parameter
+(keyword) @variable.parameter
; Self
(self) @variable.builtin
; Literal
-(type (symbol_literal) @symbol)
+(type (symbol_literal) @string.special.symbol)
(type (string_literal (escape_sequence) @string.escape))
(type (string_literal) @string)
diff --git a/queries/re2c/highlights.scm b/queries/re2c/highlights.scm
index fd59c7208..7e679fbcc 100644
--- a/queries/re2c/highlights.scm
+++ b/queries/re2c/highlights.scm
@@ -5,14 +5,14 @@
"re2c"
"local"
"rules"
-] @namespace
+] @module
; Includes
[
"!use"
"!include"
-] @include
+] @keyword.import
; Keywords
@@ -49,7 +49,7 @@
"*"
"+"
"?"
-] @repeat
+] @keyword.repeat
; Constants
@@ -116,7 +116,7 @@
; Literals
-(regex) @string.regex
+(regex) @string.regexp
[
(dstring) ; case sensitive
@@ -150,7 +150,7 @@
(#offset! @type 0 1 0 -1))
(set_header
- value: (dstring) @string.special @text.underline)
+ value: (dstring) @string.special)
(host_lang) @none
diff --git a/queries/regex/highlights.scm b/queries/regex/highlights.scm
index 3aa4af909..ddcf1d92a 100644
--- a/queries/regex/highlights.scm
+++ b/queries/regex/highlights.scm
@@ -17,7 +17,7 @@
;; These are escaped special characters that lost their special meaning
;; -> no special highlighting
-(identity_escape) @string.regex
+(identity_escape) @string.regexp
(class_character) @constant
diff --git a/queries/rego/highlights.scm b/queries/rego/highlights.scm
index 8d15d4fb4..5abaf0fd5 100644
--- a/queries/rego/highlights.scm
+++ b/queries/rego/highlights.scm
@@ -2,7 +2,7 @@
[
(import)
(package)
-] @include
+] @keyword.import
[
(with)
@@ -43,9 +43,9 @@
(expr_call func_name: (fn_name (var) @function .))
-(expr_call func_arguments: (fn_args (expr) @parameter))
+(expr_call func_arguments: (fn_args (expr) @variable.parameter))
-(rule_args (term) @parameter)
+(rule_args (term) @variable.parameter)
[
(open_paren)
@@ -56,9 +56,9 @@
(close_curly)
] @punctuation.bracket
-(rule (rule_head (var) @method))
+(rule (rule_head (var) @function.method))
(rule
- (rule_head (term (ref (var) @namespace)))
- (rule_body (query (literal (expr (expr_infix (expr (term (ref (var)) @_output)))))) (#eq? @_output @namespace))
+ (rule_head (term (ref (var) @module)))
+ (rule_body (query (literal (expr (expr_infix (expr (term (ref (var)) @_output)))))) (#eq? @_output @module))
)
diff --git a/queries/requirements/highlights.scm b/queries/requirements/highlights.scm
index 3d3d20d91..921c3204b 100644
--- a/queries/requirements/highlights.scm
+++ b/queries/requirements/highlights.scm
@@ -2,11 +2,11 @@
(package) @variable
-(extras (package) @parameter)
+(extras (package) @variable.parameter)
-(path) @text.underline @string.special
+(path) @string.special.path
-(url) @text.uri
+(url) @string.special.url
;; versions
diff --git a/queries/robot/highlights.scm b/queries/robot/highlights.scm
index 06c559986..b5f7bd105 100644
--- a/queries/robot/highlights.scm
+++ b/queries/robot/highlights.scm
@@ -35,23 +35,23 @@
"IN ZIP"
(break_statement)
(continue_statement)
-] @repeat
-(for_statement "END" @repeat)
+] @keyword.repeat
+(for_statement "END" @keyword.repeat)
-"WHILE" @repeat
-(while_statement "END" @repeat)
+"WHILE" @keyword.repeat
+(while_statement "END" @keyword.repeat)
[
"IF"
"ELSE IF"
-] @conditional
-(if_statement "END" @conditional)
-(if_statement (else_statement "ELSE" @conditional))
+] @keyword.conditional
+(if_statement "END" @keyword.conditional)
+(if_statement (else_statement "ELSE" @keyword.conditional))
[
"TRY"
"EXCEPT"
"FINALLY"
-] @exception
-(try_statement "END" @exception)
-(try_statement (else_statement "ELSE" @exception))
+] @keyword.exception
+(try_statement "END" @keyword.exception)
+(try_statement (else_statement "ELSE" @keyword.exception))
diff --git a/queries/ron/highlights.scm b/queries/ron/highlights.scm
index 7f5b9030f..4b0a87a50 100644
--- a/queries/ron/highlights.scm
+++ b/queries/ron/highlights.scm
@@ -15,7 +15,7 @@
(string) @string
(boolean) @boolean
(integer) @number
-(float) @float
+(float) @number.float
(char) @character
diff --git a/queries/rst/highlights.scm b/queries/rst/highlights.scm
index 3231262c2..b3b2b0a88 100644
--- a/queries/rst/highlights.scm
+++ b/queries/rst/highlights.scm
@@ -7,11 +7,13 @@
"__"
":"
"::"
- "bullet"
- "adornment"
(transition)
] @punctuation.special
+[
+ "bullet"
+ "adornment"
+] @markup.list
;; Resets for injection
(doctest_block) @none
@@ -22,11 +24,11 @@
name: (type) @function)
(directive
- body: (body (arguments) @parameter))
+ body: (body (arguments) @variable.parameter))
((directive
- name: (type) @include)
- (#eq? @include "include"))
+ name: (type) @keyword.import)
+ (#eq? @keyword.import "include"))
((directive
name: (type) @function.builtin)
@@ -48,10 +50,10 @@
[
(literal_block)
(line_block)
-] @text.literal
+] @markup.raw.block
(block_quote
- (attribution)? @text.emphasis) @text.literal
+ (attribution)? @markup.italic) @markup.quote
(substitution_definition
name: (substitution) @constant)
@@ -63,26 +65,26 @@
name: (label) @constant)
(target
- name: (name)? @constant
- link: (_)? @text.literal)
+ name: (name)? @markup.link.label
+ link: (_)? @markup.link)
;; Lists
; Definition lists
(list_item
- (term) @text.strong
- (classifier)? @text.emphasis)
+ (term) @markup.strong
+ (classifier)? @markup.italic)
; Field lists
(field (field_name) @constant)
;; Inline markup
-(emphasis) @text.emphasis
+(emphasis) @markup.italic
-(strong) @text.strong
+(strong) @markup.strong
-(standalone_hyperlink) @text.uri @nospell
+(standalone_hyperlink) @string.special.url @nospell
(role) @function
@@ -111,17 +113,17 @@
[
"interpreted_text"
(literal)
-] @text.literal
+] @markup.raw
; Prefix role
((interpreted_text
(role) @_role
- "interpreted_text" @text.emphasis)
+ "interpreted_text" @markup.italic)
(#eq? @_role ":emphasis:"))
((interpreted_text
(role) @_role
- "interpreted_text" @text.strong)
+ "interpreted_text" @markup.strong)
(#eq? @_role ":strong:"))
((interpreted_text
@@ -131,12 +133,12 @@
; Suffix role
((interpreted_text
- "interpreted_text" @text.emphasis
+ "interpreted_text" @markup.italic
(role) @_role)
(#eq? @_role ":emphasis:"))
((interpreted_text
- "interpreted_text" @text.strong
+ "interpreted_text" @markup.strong
(role) @_role)
(#eq? @_role ":strong:"))
@@ -151,11 +153,11 @@
(footnote_reference)
(citation_reference)
(reference)
-] @text.reference @nospell
+] @markup.link @nospell
;; Others
-(title) @text.title
+(title) @markup.heading
(comment) @comment @spell
(comment "..") @comment
diff --git a/queries/ruby/highlights.scm b/queries/ruby/highlights.scm
index 727c0fc50..d68c11847 100644
--- a/queries/ruby/highlights.scm
+++ b/queries/ruby/highlights.scm
@@ -45,10 +45,10 @@
"unless"
"when"
"then"
- ] @conditional
+ ] @keyword.conditional
(if
- "end" @conditional)
+ "end" @keyword.conditional)
[
"for"
@@ -58,7 +58,7 @@
"redo"
"retry"
"next"
- ] @repeat
+ ] @keyword.repeat
(constant) @constant
@@ -68,10 +68,10 @@
[
"rescue"
"ensure"
- ] @exception
+ ] @keyword.exception
-((identifier) @exception
- (#any-of? @exception "fail" "raise"))
+((identifier) @keyword.exception
+ (#any-of? @keyword.exception "fail" "raise"))
; Function calls
@@ -87,8 +87,8 @@
(program
(call
- (identifier) @include)
- (#any-of? @include "require" "require_relative" "load"))
+ (identifier) @keyword.import)
+ (#any-of? @keyword.import "require" "require_relative" "load"))
; Function definitions
@@ -126,15 +126,15 @@
(super)
] @variable.builtin
-(method_parameters (identifier) @parameter)
-(lambda_parameters (identifier) @parameter)
-(block_parameters (identifier) @parameter)
-(splat_parameter (identifier) @parameter)
-(hash_splat_parameter (identifier) @parameter)
-(optional_parameter (identifier) @parameter)
-(destructured_parameter (identifier) @parameter)
-(block_parameter (identifier) @parameter)
-(keyword_parameter (identifier) @parameter)
+(method_parameters (identifier) @variable.parameter)
+(lambda_parameters (identifier) @variable.parameter)
+(block_parameters (identifier) @variable.parameter)
+(splat_parameter (identifier) @variable.parameter)
+(hash_splat_parameter (identifier) @variable.parameter)
+(optional_parameter (identifier) @variable.parameter)
+(destructured_parameter (identifier) @variable.parameter)
+(block_parameter (identifier) @variable.parameter)
+(keyword_parameter (identifier) @variable.parameter)
; TODO: Re-enable this once it is supported
; ((identifier) @function
@@ -159,13 +159,13 @@
(simple_symbol)
(delimited_symbol)
(hash_key_symbol)
- ] @symbol
+ ] @string.special.symbol
(pair key: (hash_key_symbol) ":" @constant)
-(regex) @string.regex
+(regex) @string.regexp
(escape_sequence) @string.escape
(integer) @number
-(float) @float
+(float) @number.float
[
(true)
diff --git a/queries/rust/highlights.scm b/queries/rust/highlights.scm
index 60438bd72..a262b6f08 100644
--- a/queries/rust/highlights.scm
+++ b/queries/rust/highlights.scm
@@ -23,12 +23,12 @@
(primitive_type) @type.builtin
-(field_identifier) @field
+(field_identifier) @variable.member
-(shorthand_field_initializer (identifier) @field)
+(shorthand_field_initializer (identifier) @variable.member)
(mod_item
- name: (identifier) @namespace)
+ name: (identifier) @module)
(self) @variable.builtin
@@ -40,9 +40,9 @@
(function_signature_item (identifier) @function)
-(parameter (identifier) @parameter)
+(parameter (identifier) @variable.parameter)
-(closure_parameters (_) @parameter)
+(closure_parameters (_) @variable.parameter)
; Function calls
@@ -79,14 +79,14 @@
; Assume that uppercase names in paths are types
(scoped_identifier
- path: (identifier) @namespace)
+ path: (identifier) @module)
(scoped_identifier
(scoped_identifier
- name: (identifier) @namespace))
+ name: (identifier) @module))
(scoped_type_identifier
- path: (identifier) @namespace)
+ path: (identifier) @module)
(scoped_type_identifier
path: (identifier) @type
@@ -94,7 +94,7 @@
(scoped_type_identifier
(scoped_identifier
- name: (identifier) @namespace))
+ name: (identifier) @module))
((scoped_identifier
path: (identifier) @type)
@@ -123,16 +123,16 @@
[
(crate)
(super)
-] @namespace
+] @module
(scoped_use_list
- path: (identifier) @namespace)
+ path: (identifier) @module)
(scoped_use_list
path: (scoped_identifier
- (identifier) @namespace))
+ (identifier) @module))
-(use_list (scoped_identifier (identifier) @namespace . (_)))
+(use_list (scoped_identifier (identifier) @module . (_)))
(use_list (identifier) @type (#lua-match? @type "^[A-Z]"))
@@ -216,7 +216,7 @@
(integer_literal) @number
-(float_literal) @float
+(float_literal) @number.float
[
(raw_string_literal)
@@ -232,9 +232,9 @@
[
"use"
"mod"
-] @include
+] @keyword.import
-(use_as_clause "as" @include)
+(use_as_clause "as" @keyword.import)
[
"default"
@@ -266,9 +266,9 @@
"static"
"dyn"
"extern"
-] @storageclass
+] @keyword.storage
-(lifetime ["'" (identifier)] @storageclass.lifetime)
+(lifetime ["'" (identifier)] @keyword.storage.lifetime)
"fn" @keyword.function
@@ -281,19 +281,19 @@
(qualified_type "as" @keyword.operator)
-(use_list (self) @namespace)
+(use_list (self) @module)
-(scoped_use_list (self) @namespace)
+(scoped_use_list (self) @module)
-(scoped_identifier [(crate) (super) (self)] @namespace)
+(scoped_identifier [(crate) (super) (self)] @module)
-(visibility_modifier [(crate) (super) (self)] @namespace)
+(visibility_modifier [(crate) (super) (self)] @module)
[
"if"
"else"
"match"
-] @conditional
+] @keyword.conditional
[
"break"
@@ -301,10 +301,10 @@
"in"
"loop"
"while"
-] @repeat
+] @keyword.repeat
"for" @keyword
-(for_expression "for" @repeat)
+(for_expression "for" @keyword.repeat)
; Operators
@@ -370,16 +370,16 @@
(empty_type "!" @type.builtin)
(macro_invocation
- macro: (identifier) @exception
- "!" @exception
- (#eq? @exception "panic"))
+ macro: (identifier) @keyword.exception
+ "!" @keyword.exception
+ (#eq? @keyword.exception "panic"))
(macro_invocation
- macro: (identifier) @exception
- "!" @exception
- (#contains? @exception "assert"))
+ macro: (identifier) @keyword.exception
+ "!" @keyword.exception
+ (#contains? @keyword.exception "assert"))
(macro_invocation
- macro: (identifier) @debug
- "!" @debug
- (#eq? @debug "dbg"))
+ macro: (identifier) @keyword.debug
+ "!" @keyword.debug
+ (#eq? @keyword.debug "dbg"))
diff --git a/queries/scala/highlights.scm b/queries/scala/highlights.scm
index 743d16cc2..2c483c46b 100644
--- a/queries/scala/highlights.scm
+++ b/queries/scala/highlights.scm
@@ -21,9 +21,9 @@
;; variables
(class_parameter
- name: (identifier) @parameter)
+ name: (identifier) @variable.parameter)
-(self_type (identifier) @parameter)
+(self_type (identifier) @variable.parameter)
(interpolation (identifier) @none)
(interpolation (block) @none)
@@ -52,24 +52,24 @@
; method definition
(function_declaration
- name: (identifier) @method)
+ name: (identifier) @function.method)
(function_definition
- name: (identifier) @method)
+ name: (identifier) @function.method)
; imports/exports
(import_declaration
- path: (identifier) @namespace)
-((stable_identifier (identifier) @namespace))
+ path: (identifier) @module)
+((stable_identifier (identifier) @module))
((import_declaration
path: (identifier) @type) (#lua-match? @type "^[A-Z]"))
((stable_identifier (identifier) @type) (#lua-match? @type "^[A-Z]"))
(export_declaration
- path: (identifier) @namespace)
-((stable_identifier (identifier) @namespace))
+ path: (identifier) @module)
+((stable_identifier (identifier) @module))
((export_declaration
path: (identifier) @type) (#lua-match? @type "^[A-Z]"))
@@ -87,7 +87,7 @@
(call_expression
function: (field_expression
- field: (identifier) @method.call))
+ field: (identifier) @function.method.call))
((call_expression
function: (identifier) @constructor)
@@ -105,10 +105,10 @@
name: (identifier) @function)
(parameter
- name: (identifier) @parameter)
+ name: (identifier) @variable.parameter)
(binding
- name: (identifier) @parameter)
+ name: (identifier) @variable.parameter)
; expressions
@@ -125,15 +125,16 @@
(boolean_literal) @boolean
(integer_literal) @number
-(floating_point_literal) @float
+(floating_point_literal) @number.float
[
- (symbol_literal)
(string)
(character_literal)
(interpolated_string_expression)
] @string
+(symbol_literal) @string.special.symbol
+
(interpolation "$" @punctuation.special)
;; keywords
@@ -177,11 +178,11 @@
"protected"
] @type.qualifier
-(inline_modifier) @storageclass
+(inline_modifier) @keyword.storage
(null_literal) @constant.builtin
-(wildcard) @parameter
+(wildcard) @variable.parameter
(annotation) @attribute
@@ -194,7 +195,7 @@
"if"
"match"
"then"
-] @conditional
+] @keyword.conditional
[
"("
@@ -215,7 +216,7 @@
"for"
"while"
"yield"
-] @repeat
+] @keyword.repeat
"def" @keyword.function
@@ -225,13 +226,13 @@
"@"
] @operator
-["import" "export"] @include
+["import" "export"] @keyword.import
[
"try"
"catch"
"throw"
-] @exception
+] @keyword.exception
"return" @keyword.return
@@ -246,7 +247,7 @@
;; `case` is a conditional keyword in case_block
(case_block
- (case_clause ("case") @conditional))
+ (case_clause ("case") @keyword.conditional))
(operator_identifier) @operator
@@ -260,5 +261,5 @@
)
;; Scala CLI using directives
-(using_directive_key) @parameter
+(using_directive_key) @variable.parameter
(using_directive_value) @string
diff --git a/queries/scfg/highlights.scm b/queries/scfg/highlights.scm
index 240d48a90..0fcfa7c9b 100644
--- a/queries/scfg/highlights.scm
+++ b/queries/scfg/highlights.scm
@@ -5,4 +5,4 @@
(comment) @comment @spell
(directive_name) @type
-(directive_params) @parameter
+(directive_params) @variable.parameter
diff --git a/queries/scheme/highlights.scm b/queries/scheme/highlights.scm
index 7a8acfe9e..f555920ba 100644
--- a/queries/scheme/highlights.scm
+++ b/queries/scheme/highlights.scm
@@ -76,19 +76,19 @@
"assert"
"library" "export" "import" "rename" "only" "except" "prefix"))
-((symbol) @conditional
- (#any-of? @conditional "if" "cond" "case" "when" "unless"))
+((symbol) @keyword.conditional
+ (#any-of? @keyword.conditional "if" "cond" "case" "when" "unless"))
;; quote
(quote
"'"
- (symbol)) @symbol
+ (symbol)) @string.special.symbol
(list
.
(symbol) @_f
- (#eq? @_f "quote")) @symbol
+ (#eq? @_f "quote")) @string.special.symbol
;; library
@@ -96,7 +96,7 @@
.
(symbol) @_lib
.
- (symbol) @namespace
+ (symbol) @module
(#eq? @_lib "library"))
diff --git a/queries/scss/highlights.scm b/queries/scss/highlights.scm
index f45b4301e..b0801bb6f 100644
--- a/queries/scss/highlights.scm
+++ b/queries/scss/highlights.scm
@@ -15,7 +15,7 @@
"@return" @keyword.return
-"@include" @include
+"@include" @keyword.import
[
"@while"
@@ -24,7 +24,7 @@
"from"
"through"
"in"
-] @repeat
+] @keyword.repeat
(single_line_comment) @comment @spell
(function_name) @function
@@ -37,25 +37,25 @@
(mixin_statement (name) @function)
-(mixin_statement (parameters (parameter) @parameter))
+(mixin_statement (parameters (parameter) @variable.parameter))
(function_statement (name) @function)
-(function_statement (parameters (parameter) @parameter))
+(function_statement (parameters (parameter) @variable.parameter))
(plain_value) @string
(keyword_query) @function
(identifier) @variable
(variable_name) @variable
-(each_statement (key) @parameter)
-(each_statement (value) @parameter)
-(each_statement (variable_value) @parameter)
+(each_statement (key) @variable.parameter)
+(each_statement (value) @variable.parameter)
+(each_statement (variable_value) @variable.parameter)
-(for_statement (variable) @parameter)
-(for_statement (_ (variable_value) @parameter))
+(for_statement (variable) @variable.parameter)
+(for_statement (_ (variable_value) @variable.parameter))
-(argument) @parameter
-(arguments (variable_value) @parameter)
+(argument) @variable.parameter
+(arguments (variable_value) @variable.parameter)
[
"["
diff --git a/queries/slang/highlights.scm b/queries/slang/highlights.scm
index 6fd5f45ea..e93682eee 100644
--- a/queries/slang/highlights.scm
+++ b/queries/slang/highlights.scm
@@ -36,7 +36,7 @@
[
"__exported"
"import"
-] @include
+] @keyword.import
(property_declaration
(identifier) @property)
diff --git a/queries/slint/highlights.scm b/queries/slint/highlights.scm
index 2ec720c33..a4fc7f4f3 100644
--- a/queries/slint/highlights.scm
+++ b/queries/slint/highlights.scm
@@ -2,7 +2,7 @@
(type_identifier) @type
(comment) @comment @spell
(int_literal) @number
-(float_literal) @float
+(float_literal) @number.float
(string_literal) @string
(function_identifier) @function
[
@@ -16,33 +16,33 @@
(call_expression
function: (field_expression
field: (identifier) @function.call))
-(vis) @include
+(vis) @keyword.import
(units) @type
(array_literal
(identifier) @type)
-(transition_statement state: (identifier) @field)
-(state_expression state: (identifier) @field)
+(transition_statement state: (identifier) @variable.member)
+(state_expression state: (identifier) @variable.member)
(struct_block_definition
- (identifier) @field)
+ (identifier) @variable.member)
-; (state_identifier) @field
+; (state_identifier) @variable.member
[
"in"
"for"
-] @repeat
+] @keyword.repeat
"@" @keyword
[
"import"
"from"
-] @include
+] @keyword.import
[
"if"
"else"
-] @conditional
+] @keyword.conditional
[
"root"
@@ -151,4 +151,4 @@
"=>"
] @operator
-(ternary_expression [":" "?"] @conditional.ternary)
+(ternary_expression [":" "?"] @keyword.conditional.ternary)
diff --git a/queries/smali/highlights.scm b/queries/smali/highlights.scm
index 3b6035c09..9668c59ba 100644
--- a/queries/smali/highlights.scm
+++ b/queries/smali/highlights.scm
@@ -20,40 +20,40 @@
; Methods
(method_definition
- (method_signature (method_identifier) @method))
+ (method_signature (method_identifier) @function.method))
(expression
(opcode) @_invoke
(body
(full_method_signature
- (method_signature (method_identifier) @method.call)))
+ (method_signature (method_identifier) @function.method.call)))
(#lua-match? @_invoke "^invoke"))
(method_handle
(full_method_signature
- (method_signature (method_identifier) @method.call)))
+ (method_signature (method_identifier) @function.method.call)))
(custom_invoke
- . (identifier) @method.call
- (method_signature (method_identifier) @method.call))
+ . (identifier) @function.method.call
+ (method_signature (method_identifier) @function.method.call))
(annotation_value
(body
- (method_signature (method_identifier) @method.call)))
+ (method_signature (method_identifier) @function.method.call)))
(annotation_value
(body
(full_method_signature
- (method_signature (method_identifier) @method.call))))
+ (method_signature (method_identifier) @function.method.call))))
(field_definition
(body
- (method_signature (method_identifier) @method.call)))
+ (method_signature (method_identifier) @function.method.call)))
(field_definition
(body
(full_method_signature
- (method_signature (method_identifier) @method.call))))
+ (method_signature (method_identifier) @function.method.call))))
((method_identifier) @constructor
(#any-of? @constructor "<init>" "<clinit>"))
@@ -65,7 +65,7 @@
[
(field_identifier)
(annotation_key)
-] @field
+] @variable.member
((field_identifier) @constant
(#lua-match? @constant "^[%u_]*$"))
@@ -79,8 +79,8 @@
; Parameters
-(parameter) @parameter.builtin
-(param_identifier) @parameter
+(parameter) @variable.parameter.builtin
+(param_identifier) @variable.parameter
; Labels
@@ -96,14 +96,14 @@
((opcode) @keyword.return
(#lua-match? @keyword.return "^return"))
-((opcode) @conditional
- (#lua-match? @conditional "^if"))
+((opcode) @keyword.conditional
+ (#lua-match? @keyword.conditional "^if"))
-((opcode) @conditional
- (#lua-match? @conditional "^cmp"))
+((opcode) @keyword.conditional
+ (#lua-match? @keyword.conditional "^cmp"))
-((opcode) @exception
- (#lua-match? @exception "^throw"))
+((opcode) @keyword.exception
+ (#lua-match? @keyword.exception "^throw"))
((opcode) @comment
(#eq? @comment "nop")) ; haha, anyone get it? ;)
@@ -148,7 +148,7 @@
[
".source"
-] @include
+] @keyword.import
[
".method"
@@ -158,12 +158,12 @@
[
".catch"
".catchall"
-] @exception
+] @keyword.exception
; Literals
(string) @string
-(source_directive (string "\"" _ @text.uri "\""))
+(source_directive (string "\"" _ @string.special.url "\""))
(escape_sequence) @string.escape
(character) @character
@@ -176,7 +176,7 @@
(float)
(NaN)
(Infinity)
-] @float
+] @number.float
(boolean) @boolean
@@ -184,7 +184,7 @@
; Misc
-(annotation_visibility) @storageclass
+(annotation_visibility) @keyword.storage
(access_modifier) @type.qualifier
@@ -204,7 +204,7 @@
"/"
] @punctuation.delimiter
-(line_directive (number) @text.underline @text.literal)
+(line_directive (number) @string.special)
; Comments
diff --git a/queries/smithy/highlights.scm b/queries/smithy/highlights.scm
index 2b709c2a2..bb54dad73 100644
--- a/queries/smithy/highlights.scm
+++ b/queries/smithy/highlights.scm
@@ -1,16 +1,16 @@
; Preproc
-(control_key) @preproc
+(control_key) @keyword.directive
; Namespace
-(namespace) @namespace
+(namespace) @module
; Includes
[
"use"
-] @include
+] @keyword.import
; Builtins
@@ -25,13 +25,13 @@
; Fields (Members)
-; (field) @field
+; (field) @variable.member
-(key_identifier) @field
+(key_identifier) @variable.member
(shape_member
- (field) @field)
-(operation_field) @field
-(operation_error_field) @field
+ (field) @variable.member)
+(operation_field) @variable.member
+(operation_error_field) @variable.member
; Constants
@@ -82,7 +82,7 @@
(number) @number
-(float) @float
+(float) @number.float
(boolean) @boolean
diff --git a/queries/snakemake/highlights.scm b/queries/snakemake/highlights.scm
index 8b173e0b5..07f86e40d 100644
--- a/queries/snakemake/highlights.scm
+++ b/queries/snakemake/highlights.scm
@@ -17,11 +17,11 @@
;; Rule imports
(rule_import
- "use" @include
- "rule" @include
- "from" @include
- "as"? @include
- "with"? @include
+ "use" @keyword.import
+ "rule" @keyword.import
+ "from" @keyword.import
+ "as"? @keyword.import
+ "with"? @keyword.import
)
diff --git a/queries/solidity/highlights.scm b/queries/solidity/highlights.scm
index f537cfab2..70ad31a1b 100644
--- a/queries/solidity/highlights.scm
+++ b/queries/solidity/highlights.scm
@@ -3,16 +3,16 @@
[
"pragma"
"solidity"
-] @preproc
+] @keyword.directive
(solidity_pragma_token
- "||" @symbol)
+ "||" @string.special.symbol)
(solidity_pragma_token
- "-" @symbol)
+ "-" @string.special.symbol)
(solidity_version_comparison_operator) @operator
-(solidity_version) @text.underline @string.special
+(solidity_version) @string.special
; Literals
@@ -22,11 +22,11 @@
] @string
(hex_string_literal
- "hex" @symbol
+ "hex" @string.special.symbol
(_) @string)
(unicode_string_literal
- "unicode" @symbol
+ "unicode" @string.special.symbol
(_) @string)
[
@@ -57,7 +57,7 @@
(contract_declaration name: (identifier) @type)
(struct_declaration name: (identifier) @type)
-(struct_member name: (identifier) @field)
+(struct_member name: (identifier) @variable.member)
(enum_declaration name: (identifier) @type)
(emit_statement . (identifier) @type)
; Handles ContractA, ContractB in function foo() override(ContractA, contractB) {}
@@ -77,26 +77,26 @@
(modifier_invocation (identifier) @function)
; Handles expressions like structVariable.g();
-(call_expression . (member_expression (identifier) @method.call))
+(call_expression . (member_expression (identifier) @function.method.call))
; Handles expressions like g();
(call_expression . (identifier) @function.call)
; Function parameters
-(event_paramater name: (identifier) @parameter)
-(parameter name: (identifier) @parameter)
+(event_paramater name: (identifier) @variable.parameter)
+(parameter name: (identifier) @variable.parameter)
; Yul functions
(yul_function_call function: (yul_identifier) @function.call)
; Yul function parameters
-(yul_function_definition . (yul_identifier) @function (yul_identifier) @parameter)
+(yul_function_definition . (yul_identifier) @function (yul_identifier) @variable.parameter)
(meta_type_expression "type" @keyword)
-(member_expression property: (identifier) @field)
-(call_struct_argument name: (identifier) @field)
-(struct_field_assignment name: (identifier) @field)
+(member_expression property: (identifier) @variable.member)
+(call_struct_argument name: (identifier) @variable.member)
+(struct_field_assignment name: (identifier) @variable.member)
(enum_value) @constant
; Keywords
@@ -143,7 +143,7 @@
"storage"
"calldata"
"constant"
-] @storageclass
+] @keyword.storage
[
"for"
@@ -151,7 +151,7 @@
"do"
"break"
"continue"
-] @repeat
+] @keyword.repeat
[
"if"
@@ -159,17 +159,17 @@
"switch"
"case"
"default"
-] @conditional
+] @keyword.conditional
(ternary_expression
- "?" @conditional.ternary
- ":" @conditional.ternary)
+ "?" @keyword.conditional.ternary
+ ":" @keyword.conditional.ternary)
[
"try"
"catch"
"revert"
-] @exception
+] @keyword.exception
[
"return"
@@ -182,11 +182,11 @@
[
"import"
"using"
-] @include
-(import_directive "as" @include)
-(import_directive "from" @include)
-((import_directive source: (string) @text.underline)
- (#offset! @text.underline 0 1 0 -1))
+] @keyword.import
+(import_directive "as" @keyword.import)
+(import_directive "from" @keyword.import)
+((import_directive source: (string) @string.special.path)
+ (#offset! @string.special.path 0 1 0 -1))
; Punctuation
diff --git a/queries/soql/highlights.scm b/queries/soql/highlights.scm
index 83736d9a7..def688ab2 100644
--- a/queries/soql/highlights.scm
+++ b/queries/soql/highlights.scm
@@ -32,7 +32,7 @@
(alias_expression
(identifier) @label)
-(storage_identifier) @storageclass
+(storage_identifier) @keyword.storage
(_ function_name: (identifier) @function)
(date_literal) @string.special
@@ -122,7 +122,7 @@
"WHEN"
"ELSE"
"THEN"
-] @conditional
+] @keyword.conditional
; Using Scope
[
diff --git a/queries/sparql/highlights.scm b/queries/sparql/highlights.scm
index 2cc745b65..0a4b6a84c 100644
--- a/queries/sparql/highlights.scm
+++ b/queries/sparql/highlights.scm
@@ -19,7 +19,7 @@
[
"_:"
(namespace)
-] @namespace
+] @module
[
"UNDEF"
@@ -84,7 +84,7 @@
[
(decimal)
(double)
-] @float
+] @number.float
(boolean_literal) @boolean
[
@@ -184,12 +184,12 @@
[
bound_variable: (var)
"*"
- ] @parameter)
-(bind bound_variable: (var) @parameter)
-(data_block bound_variable: (var) @parameter)
-(group_condition bound_variable: (var) @parameter)
+ ] @variable.parameter)
+(bind bound_variable: (var) @variable.parameter)
+(data_block bound_variable: (var) @variable.parameter)
+(group_condition bound_variable: (var) @variable.parameter)
-(iri_reference ["<" ">"] @namespace)
+(iri_reference ["<" ">"] @module)
(lang_tag) @type
(rdf_literal
diff --git a/queries/sql/highlights.scm b/queries/sql/highlights.scm
index d9f071362..aaadd0e2c 100644
--- a/queries/sql/highlights.scm
+++ b/queries/sql/highlights.scm
@@ -19,7 +19,7 @@
alias: (identifier) @variable)
(field
- name: (identifier) @field)
+ name: (identifier) @variable.member)
(term
alias: (identifier) @variable)
@@ -36,10 +36,10 @@
((literal) @number
(#lua-match? @number "^%d+$"))
-((literal) @float
-(#lua-match? @float "^[-]?%d*\.%d*$"))
+((literal) @number.float
+(#lua-match? @number.float "^[-]?%d*\.%d*$"))
-(parameter) @parameter
+(parameter) @variable.parameter
[
(keyword_true)
@@ -92,14 +92,14 @@
(keyword_jsonfile)
(keyword_sequencefile)
(keyword_volatile)
-] @storageclass
+] @keyword.storage
[
(keyword_case)
(keyword_when)
(keyword_then)
(keyword_else)
-] @conditional
+] @keyword.conditional
[
(keyword_select)
diff --git a/queries/squirrel/highlights.scm b/queries/squirrel/highlights.scm
index b0b9caf56..5fa20881c 100644
--- a/queries/squirrel/highlights.scm
+++ b/queries/squirrel/highlights.scm
@@ -40,7 +40,7 @@
"case"
"default"
"break"
-] @conditional
+] @keyword.conditional
; Repeats
@@ -50,7 +50,7 @@
"do"
"while"
"continue"
-] @repeat
+] @keyword.repeat
; Exceptions
@@ -58,13 +58,13 @@
"try"
"catch"
"throw"
-] @exception
+] @keyword.exception
; Storageclasses
[
"local"
-] @storageclass
+] @keyword.storage
; Qualifiers
@@ -90,7 +90,7 @@
; Parameters
(parameter
- . (identifier) @parameter)
+ . (identifier) @variable.parameter)
; Properties (Slots)
@@ -128,7 +128,7 @@
(member_declaration
(function_declaration
- "::"? (_) @method . "(" (_)? ")"))
+ "::"? (_) @function.method . "(" (_)? ")"))
((function_declaration
"::"? (_) @function . "(" (_)? ")")
@@ -150,7 +150,7 @@
(identifier) @function
"="
(lambda_expression
- "@" @symbol))
+ "@" @string.special.symbol))
(call_expression
[
@@ -278,8 +278,8 @@
; Ternaries
(ternary_expression
- "?" @conditional.ternary
- ":" @conditional.ternary)
+ "?" @keyword.conditional.ternary
+ ":" @keyword.conditional.ternary)
; Literals
@@ -293,7 +293,7 @@
(integer) @number
-(float) @float
+(float) @number.float
(bool) @boolean
diff --git a/queries/ssh_config/highlights.scm b/queries/ssh_config/highlights.scm
index 8de836b17..c0a0ae3e2 100644
--- a/queries/ssh_config/highlights.scm
+++ b/queries/ssh_config/highlights.scm
@@ -2,7 +2,7 @@
(string) @string
-(pattern) @string.regex
+(pattern) @string.regexp
(token) @character
@@ -17,7 +17,7 @@
(mac)
(cipher)
(key_sig)
-] @parameter
+] @variable.parameter
[
; generic
@@ -44,7 +44,7 @@
(authentication)
] @constant.builtin
-(uri) @text.uri
+(uri) @string.special.url
; Keywords
@@ -52,7 +52,7 @@
(parameter keyword: _ @keyword)
-(host_declaration argument: _ @namespace)
+(host_declaration argument: _ @module)
(match_declaration
(condition criteria: _ @attribute))
diff --git a/queries/starlark/highlights.scm b/queries/starlark/highlights.scm
index 055fad16f..8d99963d5 100644
--- a/queries/starlark/highlights.scm
+++ b/queries/starlark/highlights.scm
@@ -28,8 +28,8 @@
"license"))
((attribute
- attribute: (identifier) @field)
- (#lua-match? @field "^[%l_].*$"))
+ attribute: (identifier) @variable.member)
+ (#lua-match? @variable.member "^[%l_].*$"))
((assignment
left: (identifier) @type.definition
@@ -108,30 +108,30 @@
;; Normal parameters
(parameters
- (identifier) @parameter)
+ (identifier) @variable.parameter)
;; Lambda parameters
(lambda_parameters
- (identifier) @parameter)
+ (identifier) @variable.parameter)
(lambda_parameters
(tuple_pattern
- (identifier) @parameter))
+ (identifier) @variable.parameter))
; Default parameters
(keyword_argument
- name: (identifier) @parameter)
+ name: (identifier) @variable.parameter)
; Naming parameters on call-site
(default_parameter
- name: (identifier) @parameter)
+ name: (identifier) @variable.parameter)
(typed_parameter
- (identifier) @parameter)
+ (identifier) @variable.parameter)
(typed_default_parameter
- (identifier) @parameter)
+ (identifier) @variable.parameter)
; Variadic parameters *args, **kwargs
(parameters
(list_splat_pattern ; *args
- (identifier) @parameter))
+ (identifier) @variable.parameter))
(parameters
(dictionary_splat_pattern ; **kwargs
- (identifier) @parameter))
+ (identifier) @variable.parameter))
;; Literals
@@ -143,12 +143,12 @@
(#eq? @variable.builtin "cls"))
(integer) @number
-(float) @float
+(float) @number.float
(comment) @comment @spell
-((module . (comment) @preproc)
- (#lua-match? @preproc "^#!/"))
+((module . (comment) @keyword.directive)
+ (#lua-match? @keyword.directive "^#!/"))
(string) @string
[
@@ -243,14 +243,14 @@
] @keyword.return
((call
- function: (identifier) @include
+ function: (identifier) @keyword.import
arguments: (argument_list
- (string) @conceal))
- (#eq? @include "load"))
+ (string) @string))
+ (#eq? @keyword.import "load"))
-["if" "elif" "else" "match" "case"] @conditional
+["if" "elif" "else" "match" "case"] @keyword.conditional
-["for" "while" "break" "continue"] @repeat
+["for" "while" "break" "continue"] @keyword.repeat
["(" ")" "[" "]" "{" "}"] @punctuation.bracket
@@ -274,7 +274,7 @@
function: (identifier) @_func
arguments: (argument_list
(keyword_argument
- name: (identifier) @field)))
+ name: (identifier) @variable.member)))
(#eq? @_func "struct"))
;; Function calls
@@ -284,7 +284,7 @@
(call
function: (attribute
- attribute: (identifier) @method.call))
+ attribute: (identifier) @function.method.call))
((call
function: (identifier) @constructor)
diff --git a/queries/strace/highlights.scm b/queries/strace/highlights.scm
index 8967542a4..2bc45abb7 100644
--- a/queries/strace/highlights.scm
+++ b/queries/strace/highlights.scm
@@ -11,7 +11,7 @@
[
(errorName)
(errorDescription)
-] @exception
+] @keyword.exception
(syscall) @function.builtin
diff --git a/queries/supercollider/highlights.scm b/queries/supercollider/highlights.scm
index 43b3087de..0d56de614 100644
--- a/queries/supercollider/highlights.scm
+++ b/queries/supercollider/highlights.scm
@@ -6,7 +6,7 @@
(block_comment) @comment @spell
; Argument definition
-(argument name: (identifier) @parameter)
+(argument name: (identifier) @variable.parameter)
; Variables
(local_var name: (identifier) @variable)
@@ -25,17 +25,17 @@
; Methods
(method_call
- name: (method_name) @method)
+ name: (method_name) @function.method)
; Classes
(class) @type
; Literals
(number) @number
-(float) @float
+(float) @number.float
(string) @string
-(symbol) @string.special
+(symbol) @string.special.symbol
; Operators
[
@@ -89,9 +89,9 @@
] @punctuation.delimiter
; control structure
-(control_structure) @conditional
+(control_structure) @keyword.conditional
(escape_sequence) @string.escape
; SinOsc.ar()!2
-(duplicated_statement) @repeat
+(duplicated_statement) @keyword.repeat
diff --git a/queries/surface/highlights.scm b/queries/surface/highlights.scm
index 35de877c9..dc123172d 100644
--- a/queries/surface/highlights.scm
+++ b/queries/surface/highlights.scm
@@ -1,5 +1,5 @@
-; Surface text is highlighted as such
-(text) @text
+; Surface text is not highlighted
+(text) @none
; Surface has two types of comments, both are highlighted as such
(comment) @comment @spell
diff --git a/queries/svelte/highlights.scm b/queries/svelte/highlights.scm
index 9539f2b51..5581c40c1 100644
--- a/queries/svelte/highlights.scm
+++ b/queries/svelte/highlights.scm
@@ -11,11 +11,11 @@
((special_block_keyword) @keyword.coroutine
(#eq? @keyword.coroutine "await"))
-((special_block_keyword) @exception
- (#eq? @exception "catch"))
+((special_block_keyword) @keyword.exception
+ (#eq? @keyword.exception "catch"))
-((special_block_keyword) @conditional
- (#any-of? @conditional "if" "else"))
+((special_block_keyword) @keyword.conditional
+ (#any-of? @keyword.conditional "if" "else"))
[
"{"
diff --git a/queries/swift/highlights.scm b/queries/swift/highlights.scm
index a73a69356..81a0d931b 100644
--- a/queries/swift/highlights.scm
+++ b/queries/swift/highlights.scm
@@ -20,15 +20,15 @@
(mutation_modifier)
] @type.qualifier
-(function_declaration (simple_identifier) @method)
+(function_declaration (simple_identifier) @function.method)
(function_declaration ["init" @constructor])
(throws) @keyword
(where_keyword) @keyword
-(parameter external_name: (simple_identifier) @parameter)
-(parameter name: (simple_identifier) @parameter)
-(type_parameter (type_identifier) @parameter)
-(inheritance_constraint (identifier (simple_identifier) @parameter))
-(equality_constraint (identifier (simple_identifier) @parameter))
+(parameter external_name: (simple_identifier) @variable.parameter)
+(parameter name: (simple_identifier) @variable.parameter)
+(type_parameter (type_identifier) @variable.parameter)
+(inheritance_constraint (identifier (simple_identifier) @variable.parameter))
+(equality_constraint (identifier (simple_identifier) @variable.parameter))
(pattern bound_identifier: (simple_identifier)) @variable
[
@@ -65,7 +65,7 @@
(value_argument
name: (value_argument_label) @property)
-(import_declaration ["import" @include])
+(import_declaration ["import" @keyword.import])
(enum_entry ["case" @keyword])
@@ -84,25 +84,25 @@
(diagnostic) @function.macro
; Statements
-(for_statement ["for" @repeat])
-(for_statement ["in" @repeat])
+(for_statement ["for" @keyword.repeat])
+(for_statement ["in" @keyword.repeat])
(for_statement (pattern) @variable)
(else) @keyword
(as_operator) @keyword
-["while" "repeat" "continue" "break"] @repeat
+["while" "repeat" "continue" "break"] @keyword.repeat
["let" "var"] @keyword
-(guard_statement ["guard" @conditional])
-(if_statement ["if" @conditional])
-(switch_statement ["switch" @conditional])
+(guard_statement ["guard" @keyword.conditional])
+(if_statement ["if" @keyword.conditional])
+(switch_statement ["switch" @keyword.conditional])
(switch_entry ["case" @keyword])
(switch_entry ["fallthrough" @keyword])
(switch_entry (default_keyword) @keyword)
"return" @keyword.return
(ternary_expression
- ["?" ":"] @conditional)
+ ["?" ":"] @keyword.conditional)
["do" (throw_keyword) (catch_keyword)] @keyword
@@ -142,12 +142,12 @@
(oct_literal)
(bin_literal)
] @number
-(real_literal) @float
+(real_literal) @number.float
(boolean_literal) @boolean
"nil" @constant.builtin
; Regex literals
-(regex_literal) @string.regex
+(regex_literal) @string.regexp
; Operators
(custom_operator) @operator
diff --git a/queries/systemtap/highlights.scm b/queries/systemtap/highlights.scm
index 54a27b897..55571a1d8 100644
--- a/queries/systemtap/highlights.scm
+++ b/queries/systemtap/highlights.scm
@@ -22,14 +22,14 @@
name: (identifier) @function)
(parameter
- name: (identifier) @parameter)
+ name: (identifier) @variable.parameter)
(type) @type.builtin
(aggregation_operator) @attribute
(member_expression
- member: (identifier) @field)
+ member: (identifier) @variable.member)
(call_expression
function: (identifier) @function.call)
@@ -43,7 +43,7 @@
((identifier) @variable.builtin
(#lua-match? @variable.builtin "^\$+[0-9A-Z_a-z]+\$*$"))
-(shebang_line) @preproc
+(shebang_line) @keyword.directive
(comment) @comment @spell
@@ -123,7 +123,7 @@
[
"if"
"else"
-] @conditional
+] @keyword.conditional
[
"break"
@@ -131,12 +131,12 @@
"for"
"foreach"
"while"
-] @repeat
+] @keyword.repeat
[
"try"
"catch"
-] @exception
+] @keyword.exception
[
"%("
@@ -145,9 +145,9 @@
"%?"
(preprocessor_tokens)
(embedded_code)
-] @preproc
+] @keyword.directive
-"@define" @define
+"@define" @keyword.directive.define
"private" @type.qualifier
-"global" @storageclass
+"global" @keyword.storage
diff --git a/queries/t32/highlights.scm b/queries/t32/highlights.scm
index d1543efd0..a0e1e3c2d 100644
--- a/queries/t32/highlights.scm
+++ b/queries/t32/highlights.scm
@@ -79,7 +79,7 @@
[
"?"
":"
-] @conditional.ternary)
+] @keyword.conditional.ternary)
; Strings and others literal types
@@ -98,7 +98,7 @@
(frequency)
(percentage)
(time)
-] @float
+] @number.float
[
(string)
@@ -107,8 +107,8 @@
(hll_escape_sequence) @string.escape
-(path) @string.special
-(symbol) @symbol
+(path) @string.special.path
+(symbol) @string.special.symbol
[
(character)
@@ -138,7 +138,7 @@
; HLL variables
(identifier) @variable
-(hll_field_identifier) @field
+(hll_field_identifier) @variable.member
; Commands
@@ -214,19 +214,19 @@
(parameter_declaration
command: (identifier) @keyword
(identifier)? @constant.builtin
- macro: (macro) @parameter)
+ macro: (macro) @variable.parameter)
; Control flow
(if_block
- command: (identifier) @conditional)
+ command: (identifier) @keyword.conditional)
(else_block
- command: (identifier) @conditional)
+ command: (identifier) @keyword.conditional)
(while_block
- command: (identifier) @repeat)
+ command: (identifier) @keyword.repeat)
(repeat_block
- command: (identifier) @repeat)
+ command: (identifier) @keyword.repeat)
(comment) @comment @spell
diff --git a/queries/tablegen/highlights.scm b/queries/tablegen/highlights.scm
index c541cd165..aea94b4eb 100644
--- a/queries/tablegen/highlights.scm
+++ b/queries/tablegen/highlights.scm
@@ -1,10 +1,10 @@
; Preprocs
-(preprocessor_directive) @preproc
+(preprocessor_directive) @keyword.directive
; Includes
-"include" @include
+"include" @keyword.import
; Keywords
@@ -30,13 +30,13 @@
"if"
"else"
"then"
-] @conditional
+] @keyword.conditional
; Repeats
[
"foreach"
-] @repeat
+] @keyword.repeat
; Variables
@@ -46,7 +46,7 @@
; Parameters
-(template_arg (identifier) @parameter)
+(template_arg (identifier) @variable.parameter)
; Types
@@ -85,10 +85,10 @@
; Fields
(instruction
- (identifier) @field)
+ (identifier) @variable.member)
(let_instruction
- (identifier) @field)
+ (identifier) @variable.member)
; Functions
@@ -148,5 +148,5 @@
] @comment @spell
-((comment) @preproc
- (#lua-match? @preproc "^.*RUN"))
+((comment) @keyword.directive
+ (#lua-match? @keyword.directive "^.*RUN"))
diff --git a/queries/teal/highlights.scm b/queries/teal/highlights.scm
index b6b79dec5..aa71fc5b5 100644
--- a/queries/teal/highlights.scm
+++ b/queries/teal/highlights.scm
@@ -6,7 +6,7 @@
(#lua-match? @comment.documentation "^[-][-][-]"))
((comment) @comment.documentation
(#lua-match? @comment.documentation "^[-][-](%s?)@"))
-(shebang_comment) @preproc
+(shebang_comment) @keyword.directive
(identifier) @variable
((identifier) @variable.builtin
(#eq? @variable.builtin "self"))
@@ -21,8 +21,8 @@
(format_specifier) @string.escape
;; Basic statements/Keywords
-[ "if" "then" "elseif" "else" ] @conditional
-[ "for" "while" "repeat" "until" ] @repeat
+[ "if" "then" "elseif" "else" ] @keyword.conditional
+[ "for" "while" "repeat" "until" ] @keyword.repeat
"return" @keyword.return
[ "in" "local" (break) (goto) "do" "end" ] @keyword
(label) @label
@@ -47,7 +47,7 @@
"function" @keyword.function)
(function_body "end" @keyword.function)
-(arg name: (identifier) @parameter)
+(arg name: (identifier) @variable.parameter)
(function_signature
(arguments
@@ -56,8 +56,8 @@
(typeargs
"<" @punctuation.bracket
- . (_) @parameter
- . ("," . (_) @parameter)*
+ . (_) @variable.parameter
+ . ("," . (_) @variable.parameter)*
. ">" @punctuation.bracket)
(function_call
diff --git a/queries/templ/highlights.scm b/queries/templ/highlights.scm
index a7a0718e6..1187344a9 100644
--- a/queries/templ/highlights.scm
+++ b/queries/templ/highlights.scm
@@ -29,7 +29,7 @@
[
(expression)
(dynamic_class_attribute_value)
-] @method
+] @function.method
(component_import
name: (component_identifier) @function)
diff --git a/queries/terraform/highlights.scm b/queries/terraform/highlights.scm
index 95d0c0451..d75b4284f 100644
--- a/queries/terraform/highlights.scm
+++ b/queries/terraform/highlights.scm
@@ -4,7 +4,7 @@
;
;
; local/module/data/var/output
-(expression (variable_expr (identifier) @variable.builtin (#any-of? @variable.builtin "data" "var" "local" "module" "output")) (get_attr (identifier) @field))
+(expression (variable_expr (identifier) @variable.builtin (#any-of? @variable.builtin "data" "var" "local" "module" "output")) (get_attr (identifier) @variable.member))
; path.root/cwd/module
(expression (variable_expr (identifier) @type.builtin (#eq? @type.builtin "path")) (get_attr (identifier) @variable.builtin (#any-of? @variable.builtin "root" "cwd" "module")))
diff --git a/queries/textproto/highlights.scm b/queries/textproto/highlights.scm
index 8ebb476e5..439ca6875 100644
--- a/queries/textproto/highlights.scm
+++ b/queries/textproto/highlights.scm
@@ -1,6 +1,6 @@
(string) @string
-(field_name) @field
+(field_name) @variable.member
(comment) @comment
diff --git a/queries/thrift/highlights.scm b/queries/thrift/highlights.scm
index 6c68dc9a3..a1ccdc9a2 100644
--- a/queries/thrift/highlights.scm
+++ b/queries/thrift/highlights.scm
@@ -8,7 +8,7 @@
[
"include"
"cpp_include"
-] @include
+] @keyword.import
; Function
@@ -17,17 +17,17 @@
; Fields
-(field (identifier) @field)
+(field (identifier) @variable.member)
; Parameters
(function_definition
(parameters
- (parameter (identifier) @parameter)))
+ (parameter (identifier) @variable.parameter)))
(throws
(parameters
- (parameter (identifier) @parameter)))
+ (parameter (identifier) @variable.parameter)))
; Types
@@ -82,7 +82,7 @@
(namespace_declaration
(namespace_scope) @tag
- [(namespace) @namespace (_ (identifier) @namespace)])
+ [(namespace) @module (_ (identifier) @module)])
; Attributes
@@ -104,7 +104,7 @@
[
"throws"
-] @exception
+] @keyword.exception
; Keywords
@@ -177,11 +177,11 @@
(escape_sequence) @string.escape
(namespace_uri
- (string) @text.uri @string.special)
+ (string) @string.special.url)
(number) @number
-(double) @float
+(double) @number.float
(boolean) @boolean
@@ -222,5 +222,5 @@
((comment) @comment.documentation
(#lua-match? @comment.documentation "^///$"))
-((comment) @preproc
- (#lua-match? @preproc "#!.*"))
+((comment) @keyword.directive
+ (#lua-match? @keyword.directive "#!.*"))
diff --git a/queries/tiger/highlights.scm b/queries/tiger/highlights.scm
index f4f666d8d..0516341c3 100644
--- a/queries/tiger/highlights.scm
+++ b/queries/tiger/highlights.scm
@@ -31,11 +31,11 @@
"for"
"to"
"while"
-] @repeat
+] @keyword.repeat
"new" @keyword.operator
-"import" @include
+"import" @keyword.import
[
"array"
@@ -90,17 +90,17 @@
name: (identifier) @function)
(method_call
- method: (identifier) @method)
+ method: (identifier) @function.method)
(method_declaration
- name: (identifier) @method)
+ name: (identifier) @function.method)
(parameters
- name: (identifier) @parameter)
+ name: (identifier) @variable.parameter)
; }}}
; Declarations {{{
(import_declaration
- file: (string_literal) @string.special)
+ file: (string_literal) @string.special.path)
; }}}
; Literals {{{
diff --git a/queries/tlaplus/highlights.scm b/queries/tlaplus/highlights.scm
index 0dd0fd939..f1ad576cf 100644
--- a/queries/tlaplus/highlights.scm
+++ b/queries/tlaplus/highlights.scm
@@ -110,14 +110,14 @@
(pcal_end_if)
"either"
(pcal_end_either)
-] @conditional
+] @keyword.conditional
[
"while"
"do"
(pcal_end_while)
"with"
(pcal_end_with)
-] @repeat
+] @keyword.repeat
("return") @keyword.return
("print") @function.macro
@@ -141,10 +141,10 @@
(string_set) @type
; Namespaces
-(extends (identifier_ref) @namespace)
-(instance (identifier_ref) @namespace)
-(module name: (identifier) @namespace)
-(pcal_algorithm name: (identifier) @namespace)
+(extends (identifier_ref) @module)
+(instance (identifier_ref) @module)
+(module name: (identifier) @module)
+(pcal_algorithm name: (identifier) @module)
; Operators, functions, and macros
(bound_infix_op symbol: (_) @operator)
@@ -155,7 +155,7 @@
((infix_op_symbol) @operator)
((postfix_op_symbol) @operator)
(function_definition name: (identifier) @function)
-(module_definition name: (_) @include)
+(module_definition name: (_) @keyword.import)
(operator_definition name: (_) @function.macro)
(pcal_macro_decl name: (identifier) @function.macro)
(pcal_macro_call name: (identifier) @function.macro)
@@ -168,25 +168,25 @@
(constant_declaration (identifier) @constant)
(constant_declaration (operator_declaration name: (_) @constant))
(pcal_var_decl (identifier) @variable)
-(pcal_with (identifier) @parameter)
+(pcal_with (identifier) @variable.parameter)
((".") . (identifier) @attribute)
(record_literal (identifier) @attribute)
(set_of_records (identifier) @attribute)
(variable_declaration (identifier) @variable)
; Parameters
-(choose (identifier) @parameter)
-(choose (tuple_of_identifiers (identifier) @parameter))
-(lambda (identifier) @parameter)
-(module_definition (operator_declaration name: (_) @parameter))
-(module_definition parameter: (identifier) @parameter)
-(operator_definition (operator_declaration name: (_) @parameter))
-(operator_definition parameter: (identifier) @parameter)
-(pcal_macro_decl parameter: (identifier) @parameter)
-(pcal_proc_var_decl (identifier) @parameter)
-(quantifier_bound (identifier) @parameter)
-(quantifier_bound (tuple_of_identifiers (identifier) @parameter))
-(unbounded_quantification (identifier) @parameter)
+(choose (identifier) @variable.parameter)
+(choose (tuple_of_identifiers (identifier) @variable.parameter))
+(lambda (identifier) @variable.parameter)
+(module_definition (operator_declaration name: (_) @variable.parameter))
+(module_definition parameter: (identifier) @variable.parameter)
+(operator_definition (operator_declaration name: (_) @variable.parameter))
+(operator_definition parameter: (identifier) @variable.parameter)
+(pcal_macro_decl parameter: (identifier) @variable.parameter)
+(pcal_proc_var_decl (identifier) @variable.parameter)
+(quantifier_bound (identifier) @variable.parameter)
+(quantifier_bound (tuple_of_identifiers (identifier) @variable.parameter))
+(unbounded_quantification (identifier) @variable.parameter)
; Delimiters
[
@@ -214,10 +214,10 @@
] @punctuation.delimiter
; Proofs
-(assume_prove (new (identifier) @parameter))
-(assume_prove (new (operator_declaration name: (_) @parameter)))
+(assume_prove (new (identifier) @variable.parameter))
+(assume_prove (new (operator_declaration name: (_) @variable.parameter)))
(assumption name: (identifier) @constant)
-(pick_proof_step (identifier) @parameter)
+(pick_proof_step (identifier) @variable.parameter)
(proof_step_id "<" @punctuation.bracket)
(proof_step_id (level) @label)
(proof_step_id (name) @label)
@@ -226,7 +226,7 @@
(proof_step_ref (level) @label)
(proof_step_ref (name) @label)
(proof_step_ref ">" @punctuation.bracket)
-(take_proof_step (identifier) @parameter)
+(take_proof_step (identifier) @variable.parameter)
(theorem name: (identifier) @constant)
; Comments and tags
diff --git a/queries/toml/highlights.scm b/queries/toml/highlights.scm
index fd6fe7309..a54dc167e 100644
--- a/queries/toml/highlights.scm
+++ b/queries/toml/highlights.scm
@@ -12,7 +12,7 @@
(comment) @comment @spell
(string) @string
(integer) @number
-(float) @float
+(float) @number.float
(offset_date_time) @string.special
(local_date_time) @string.special
(local_date) @string.special
diff --git a/queries/tsv/highlights.scm b/queries/tsv/highlights.scm
index f1e14af87..d406bd903 100644
--- a/queries/tsv/highlights.scm
+++ b/queries/tsv/highlights.scm
@@ -1,4 +1,4 @@
(text) @string
(number) @number
-(float) @float
+(float) @number.float
(boolean) @boolean
diff --git a/queries/turtle/highlights.scm b/queries/turtle/highlights.scm
index fac576781..4462d583a 100644
--- a/queries/turtle/highlights.scm
+++ b/queries/turtle/highlights.scm
@@ -7,7 +7,7 @@
"<"
">"
(namespace)
-] @namespace
+] @module
[
(iri_reference)
@@ -23,7 +23,7 @@
[
(decimal)
(double)
-] @float
+] @number.float
(boolean_literal) @boolean
diff --git a/queries/twig/highlights.scm b/queries/twig/highlights.scm
index 4e7bfe4f2..a0a19160d 100644
--- a/queries/twig/highlights.scm
+++ b/queries/twig/highlights.scm
@@ -13,10 +13,10 @@
(keyword) @keyword
(attribute) @attribute
(tag) @tag
-(conditional) @conditional
-(repeat) @repeat
-(method) @method
-(parameter) @parameter
+(conditional) @keyword.conditional
+(repeat) @keyword.repeat
+(method) @function.method
+(parameter) @variable.parameter
[
"{{"
diff --git a/queries/typescript/highlights.scm b/queries/typescript/highlights.scm
index 0a81699cd..bc6478a45 100644
--- a/queries/typescript/highlights.scm
+++ b/queries/typescript/highlights.scm
@@ -1,8 +1,8 @@
; inherits: ecma
-"require" @include
+"require" @keyword.import
-(import_require_clause source: (string) @text.uri)
+(import_require_clause source: (string) @string.special.url)
[
"declare"
@@ -96,44 +96,44 @@
(template_type ["${" "}"] @punctuation.special)
-(conditional_type ["?" ":"] @conditional.ternary)
+(conditional_type ["?" ":"] @keyword.conditional.ternary)
;;; Parameters
-(required_parameter (identifier) @parameter)
-(optional_parameter (identifier) @parameter)
+(required_parameter (identifier) @variable.parameter)
+(optional_parameter (identifier) @variable.parameter)
(required_parameter
(rest_pattern
- (identifier) @parameter))
+ (identifier) @variable.parameter))
;; ({ a }) => null
(required_parameter
(object_pattern
- (shorthand_property_identifier_pattern) @parameter))
+ (shorthand_property_identifier_pattern) @variable.parameter))
;; ({ a = b }) => null
(required_parameter
(object_pattern
(object_assignment_pattern
- (shorthand_property_identifier_pattern) @parameter)))
+ (shorthand_property_identifier_pattern) @variable.parameter)))
;; ({ a: b }) => null
(required_parameter
(object_pattern
(pair_pattern
- value: (identifier) @parameter)))
+ value: (identifier) @variable.parameter)))
;; ([ a ]) => null
(required_parameter
(array_pattern
- (identifier) @parameter))
+ (identifier) @variable.parameter))
;; a => null
(arrow_function
- parameter: (identifier) @parameter)
+ parameter: (identifier) @variable.parameter)
;; global declaration
-(ambient_declaration "global" @namespace)
+(ambient_declaration "global" @module)
;; function signatures
(ambient_declaration
@@ -141,11 +141,11 @@
name: (identifier) @function))
;; method signatures
-(method_signature name: (_) @method)
+(method_signature name: (_) @function.method)
;; property signatures
(property_signature
- name: (property_identifier) @method
+ name: (property_identifier) @function.method
type: (type_annotation
[
(union_type (parenthesized_type (function_type)))
diff --git a/queries/typoscript/highlights.scm b/queries/typoscript/highlights.scm
index 9ce80c680..c1c483c3a 100644
--- a/queries/typoscript/highlights.scm
+++ b/queries/typoscript/highlights.scm
@@ -1,4 +1,4 @@
-(identifier) @field
+(identifier) @variable.member
(constant) @constant
@@ -9,14 +9,14 @@
(condition)
(condition_end)
(condition_else)
-] @conditional
+] @keyword.conditional
(cobject) @type.builtin
[
"@import"
"INCLUDE_TYPOSCRIPT"
-] @include
+] @keyword.import
[
(comment)
diff --git a/queries/ungrammar/highlights.scm b/queries/ungrammar/highlights.scm
index 60355f577..0e4448255 100644
--- a/queries/ungrammar/highlights.scm
+++ b/queries/ungrammar/highlights.scm
@@ -16,7 +16,7 @@
[
"*"
"?"
-] @repeat
+] @keyword.repeat
[
":"
diff --git a/queries/unison/highlights.scm b/queries/unison/highlights.scm
index 20e68a1c5..88b2a1373 100644
--- a/queries/unison/highlights.scm
+++ b/queries/unison/highlights.scm
@@ -41,35 +41,35 @@
(match)
(with)
(cases)
-] @conditional
+] @keyword.conditional
(blank_pattern) @variable.builtin
(pattern) @variable (constructor_or_variable_pattern) @type
-(use_clause) @include
+(use_clause) @keyword.import
;; Types
(record_field name: (wordy_id) @variable type: (wordy_id) @type)
(type_name) @type
-(ability_declaration type_name: (wordy_id) @type type_arg: (wordy_id) @parameter)
+(ability_declaration type_name: (wordy_id) @type type_arg: (wordy_id) @variable.parameter)
(effect (wordy_id) @attribute) ;; NOTE: an effect is a special type
;; Namespaces
-(path) @namespace
-(namespace) @namespace
+(path) @module
+(namespace) @module
;; Terms
-(type_signature term_name: (path) @namespace term_name: (wordy_id) @variable)
+(type_signature term_name: (path) @module term_name: (wordy_id) @variable)
(type_signature term_name: (wordy_id) @variable)
(term_type) @type
(function_application function_name: (path) function_name: (wordy_id) @function)
(term_definition name: (wordy_id) @variable)
-(term_definition param: (wordy_id) @parameter)
+(term_definition param: (wordy_id) @variable.parameter)
;; Punctuation
[
(type_signature_colon)
@@ -85,4 +85,4 @@
"]"
] @punctuation.bracket
-(test_watch_expression (wordy_id) @preproc)
+(test_watch_expression (wordy_id) @keyword.directive)
diff --git a/queries/usd/highlights.scm b/queries/usd/highlights.scm
index 73968a647..6ba4ec98f 100644
--- a/queries/usd/highlights.scm
+++ b/queries/usd/highlights.scm
@@ -1,10 +1,10 @@
(None) @constant.builtin
-(asset_path) @text.uri
+(asset_path) @string.special.url
(attribute_property) @property
(bool) @boolean
(comment) @comment @spell
(custom) @function.builtin
-(float) @float
+(float) @number.float
(integer) @number
(orderer) @function.call
(prim_path) @string.special
@@ -16,12 +16,12 @@
;; Prefer namespace highlighting, if any.
;;
;; e.g. `rel fizz` - `fizz` uses `@identifier`
-;; e.g. `rel foo:bar:fizz` - `foo` and `bar` use `@namespace` and `fizz` uses `@identifier`
+;; e.g. `rel foo:bar:fizz` - `foo` and `bar` use `@module` and `fizz` uses `@identifier`
;;
(identifier) @variable
-(namespace_identifier) @namespace
+(namespace_identifier) @module
(namespace_identifier
- (identifier) @namespace
+ (identifier) @module
)
[
diff --git a/queries/uxntal/highlights.scm b/queries/uxntal/highlights.scm
index 795c73d09..ce81e77ef 100644
--- a/queries/uxntal/highlights.scm
+++ b/queries/uxntal/highlights.scm
@@ -1,8 +1,8 @@
; Includes
(include
- "~" @include
- _ @text.uri @string.special)
+ "~" @keyword.import
+ _ @string.special.url)
; Variables
@@ -35,25 +35,25 @@
; Labels
(label
- "@" @symbol
+ "@" @string.special.symbol
(identifier) @function)
(sublabel_reference
- (identifier) @namespace
+ (identifier) @module
"/" @punctuation.delimiter
(identifier) @label)
; Repeats
-((identifier) @repeat
- (#eq? @repeat "while"))
+((identifier) @keyword.repeat
+ (#eq? @keyword.repeat "while"))
; Literals
(raw_ascii) @string
(hex_literal
- "#" @symbol
+ "#" @string.special.symbol
(hex_lit_value) @string.special)
(number) @number
diff --git a/queries/v/highlights.scm b/queries/v/highlights.scm
index dbf059d8f..221b05028 100644
--- a/queries/v/highlights.scm
+++ b/queries/v/highlights.scm
@@ -3,7 +3,7 @@
[
"import"
"module"
-] @include
+] @keyword.import
; Keywords
@@ -38,14 +38,14 @@
"else"
"$else"
"select"
-] @conditional
+] @keyword.conditional
[
"for"
"$for"
"continue"
"break"
-] @repeat
+] @keyword.repeat
"fn" @keyword.function
@@ -56,7 +56,7 @@
"shared"
"static"
"const"
-] @storageclass
+] @keyword.storage
[
"pub"
@@ -77,13 +77,13 @@
; Namespace
(module_clause
- (identifier) @namespace)
+ (identifier) @module)
(import_path
- (import_name) @namespace)
+ (import_name) @module)
(import_alias
- (import_name) @namespace)
+ (import_name) @module)
; Literals
@@ -115,20 +115,20 @@
; Fields
-(selector_expression field: (reference_expression (identifier) @field))
+(selector_expression field: (reference_expression (identifier) @variable.member))
-(field_name) @field
+(field_name) @variable.member
(struct_field_declaration
- name: (identifier) @field)
+ name: (identifier) @variable.member)
; Parameters
(parameter_declaration
- name: (identifier) @parameter)
+ name: (identifier) @variable.parameter)
(receiver
- name: (identifier) @parameter)
+ name: (identifier) @variable.parameter)
; Constants
@@ -158,11 +158,11 @@
(function_declaration
receiver: (receiver)
- name: (identifier) @method)
+ name: (identifier) @function.method)
(call_expression
name: (selector_expression
- field: (reference_expression) @method.call))
+ field: (reference_expression) @function.method.call))
(call_expression
name: (reference_expression) @function.call)
@@ -428,7 +428,7 @@
(int_literal) @number
-(float_literal) @float
+(float_literal) @number.float
[
(c_string_literal)
diff --git a/queries/vala/highlights.scm b/queries/vala/highlights.scm
index 875bad539..3250adcb4 100644
--- a/queries/vala/highlights.scm
+++ b/queries/vala/highlights.scm
@@ -4,8 +4,8 @@
(comment) @comment @spell
((comment) @comment.documentation
(#lua-match? @comment.documentation "^/[*][*][^*].*[*]/$"))
-(symbol) @symbol
-(member_access_expression (_) (identifier) @symbol)
+(symbol) @string.special.symbol
+(member_access_expression (_) (identifier) @string.special.symbol)
; highlight constants
(
@@ -14,12 +14,12 @@
)
(
- (member_access_expression (member_access_expression) @include (identifier) @constant)
+ (member_access_expression (member_access_expression) @keyword.import (identifier) @constant)
(#lua-match? @constant "^[%u][%u%d_]*$")
)
; highlight types and probable types
-(type (symbol (_)? @namespace (identifier) @type))
+(type (symbol (_)? @module (identifier) @type))
(
(member_access_expression . (identifier) @type)
(#match? @type "^[A-Z][A-Za-z_0-9]{2,}$")
@@ -27,15 +27,15 @@
; highlight creation methods in object creation expressions
(
- (object_creation_expression (type (symbol (symbol (symbol)? @include (identifier) @type) (identifier) @constructor)))
+ (object_creation_expression (type (symbol (symbol (symbol)? @keyword.import (identifier) @type) (identifier) @constructor)))
(#lua-match? @constructor "^[%l][%l%d_]*$")
)
(unqualified_type (symbol . (identifier) @type))
-(unqualified_type (symbol (symbol) @namespace (identifier) @type))
+(unqualified_type (symbol (symbol) @module (identifier) @type))
(attribute) @attribute
-(namespace_declaration (symbol) @namespace)
+(namespace_declaration (symbol) @module)
(method_declaration (symbol (symbol) @type (identifier) @function))
(method_declaration (symbol (identifier) @function))
(local_declaration (assignment (identifier) @variable))
@@ -55,10 +55,10 @@
(method_call_expression (member_access_expression (identifier) @function.macro))
(#match? @function.macro "^assert[A-Za-z_0-9]*|error|info|debug|print|warning|warning_once$")
)
-(lambda_expression (identifier) @parameter)
-(parameter (identifier) @parameter)
+(lambda_expression (identifier) @variable.parameter)
+(parameter (identifier) @variable.parameter)
(property_declaration (symbol (identifier) @property))
-(field_declaration (identifier) @field)
+(field_declaration (identifier) @variable.member)
[
(this_access)
(base_access)
@@ -69,8 +69,8 @@
(escape_sequence) @string.escape
(integer) @number
(null) @constant.builtin
-(real) @float
-(regex) @string.regex
+(real) @number.float
+(regex) @string.regexp
(string) @string
(string_formatter) @string.special
(template_string) @string
@@ -82,10 +82,10 @@
] @type.builtin
(if_directive
- expression: (_) @preproc
+ expression: (_) @keyword.directive
) @keyword
(elif_directive
- expression: (_) @preproc
+ expression: (_) @keyword.directive
) @keyword
(else_directive) @keyword
(endif_directive) @keyword
@@ -133,10 +133,10 @@
"else"
"if"
"switch"
-] @conditional
+] @keyword.conditional
; specially highlight break statements in switch sections
-(switch_section (break_statement "break" @conditional))
+(switch_section (break_statement "break" @keyword.conditional))
[
"extern"
@@ -145,7 +145,7 @@
"protected"
"public"
"static"
-] @storageclass
+] @keyword.storage
[
"and"
@@ -160,10 +160,10 @@
"typeof"
] @keyword.operator
-"using" @include
-(using_directive (symbol) @namespace)
+"using" @keyword.import
+(using_directive (symbol) @module)
-(symbol "global::" @namespace)
+(symbol "global::" @module)
(array_creation_expression "new" @keyword.operator)
(object_creation_expression "new" @keyword.operator)
@@ -177,7 +177,7 @@
"for"
"foreach"
"while"
-] @repeat
+] @keyword.repeat
[
"catch"
@@ -185,7 +185,7 @@
"throw"
"throws"
"try"
-] @exception
+] @keyword.exception
[
"return"
diff --git a/queries/verilog/highlights.scm b/queries/verilog/highlights.scm
index 6d27863f6..1c6e578f6 100644
--- a/queries/verilog/highlights.scm
+++ b/queries/verilog/highlights.scm
@@ -66,20 +66,20 @@
"forever"
"initial"
"while"
-] @repeat
+] @keyword.repeat
[
"if"
"else"
(case_keyword)
"endcase"
-] @conditional
+] @keyword.conditional
(comment) @comment @spell
(include_compiler_directive) @constant.macro
(package_import_declaration
- "import" @include)
+ "import" @keyword.import)
(package_import_declaration
(package_import_item
@@ -162,14 +162,14 @@
(simple_identifier) @type)
(method_call_body
- (method_identifier) @field)
+ (method_identifier) @variable.member)
(interface_identifier
(simple_identifier) @type)
(modport_identifier
(modport_identifier
- (simple_identifier) @field))
+ (simple_identifier) @variable.member))
(net_port_type1
(simple_identifier) @type)
@@ -182,9 +182,9 @@
[
(default_nettype_compiler_directive)
(timescale_compiler_directive)
-] @preproc
+] @keyword.directive
-(include_compiler_directive) @include
+(include_compiler_directive) @keyword.import
; begin/end label
(seq_block
@@ -212,7 +212,7 @@
"new" @constructor)
(parameter_identifier
- (simple_identifier) @parameter)
+ (simple_identifier) @variable.parameter)
[
(integral_number)
@@ -258,12 +258,12 @@
(task_identifier
(task_identifier
- (simple_identifier) @method))
+ (simple_identifier) @function.method))
;;TODO: fixme
;(assignment_pattern_expression
;(assignment_pattern
- ;(parameter_identifier) @field))
+ ;(parameter_identifier) @variable.member))
(type_declaration
(data_type ["packed"] @type.qualifier))
@@ -290,10 +290,10 @@
(struct_union_member
(list_of_variable_decl_assignments
(variable_decl_assignment
- (simple_identifier) @field)))
+ (simple_identifier) @variable.member)))
(member_identifier
- (simple_identifier) @field)
+ (simple_identifier) @variable.member)
(struct_union_member
(data_type_or_void
diff --git a/queries/vhs/highlights.scm b/queries/vhs/highlights.scm
index 67fa3cf8a..70b6ca20a 100644
--- a/queries/vhs/highlights.scm
+++ b/queries/vhs/highlights.scm
@@ -31,8 +31,9 @@
[ "@" ] @operator
(control) @function.macro
-(float) @float
+(float) @number.float
(integer) @number
(comment) @comment @spell
-[(path) (string) (json)] @string
-(time) @symbol
+[(string) (json)] @string
+(path) @string.special.path
+(time) @string.special
diff --git a/queries/vim/highlights.scm b/queries/vim/highlights.scm
index 9bae16ae9..7b28b4759 100644
--- a/queries/vim/highlights.scm
+++ b/queries/vim/highlights.scm
@@ -9,7 +9,7 @@
"else"
"elseif"
"endif"
-] @conditional
+] @keyword.conditional
[
"try"
@@ -17,7 +17,7 @@
"finally"
"endtry"
"throw"
-] @exception
+] @keyword.exception
[
"for"
@@ -27,7 +27,7 @@
"endwhile"
"break"
"continue"
-] @repeat
+] @keyword.repeat
[
"function"
@@ -38,8 +38,8 @@
(function_declaration name: (_) @function)
(call_expression function: (identifier) @function.call)
(call_expression function: (scoped_identifier (identifier) @function.call))
-(parameters (identifier) @parameter)
-(default_parameter (identifier) @parameter)
+(parameters (identifier) @variable.parameter)
+(default_parameter (identifier) @variable.parameter)
[ (bang) (spread) ] @punctuation.special
@@ -48,7 +48,7 @@
(scope)
"a:"
"$"
-] @namespace
+] @module
;; Commands and user defined commands
@@ -153,7 +153,7 @@
"<unique>"
] @constant.builtin
-(augroup_name) @namespace
+(augroup_name) @module
(au_event) @constant
(normal_statement (commands) @constant)
@@ -203,12 +203,12 @@
(string_literal) @string
(integer_literal) @number
-(float_literal) @float
+(float_literal) @number.float
(comment) @comment @spell
(line_continuation_comment) @comment @spell
(pattern) @string.special
-(pattern_multi) @string.regex
-(filename) @string
+(pattern_multi) @string.regexp
+(filename) @string.special.path
(heredoc (body) @string)
(heredoc (parameter) @keyword)
[ (marker_definition) (endmarker) ] @label
@@ -277,7 +277,7 @@
":"
] @punctuation.delimiter
-(ternary_expression ["?" ":"] @conditional.ternary)
+(ternary_expression ["?" ":"] @keyword.conditional.ternary)
; Options
((set_value) @number
diff --git a/queries/vimdoc/highlights.scm b/queries/vimdoc/highlights.scm
index 78ae9dab9..eefc4e74b 100644
--- a/queries/vimdoc/highlights.scm
+++ b/queries/vimdoc/highlights.scm
@@ -1,31 +1,31 @@
-(h1) @text.title.1
-(h2) @text.title.2
-(h3) @text.title.3
-(column_heading) @text.title.4
+(h1) @markup.heading.1
+(h2) @markup.heading.2
+(h3) @markup.heading.3
+(column_heading) @markup.heading.4
(column_heading
- "~" @conceal (#set! conceal ""))
+ "~" @markup.heading.4.marker (#set! conceal ""))
(tag
- "*" @conceal (#set! conceal "")
+ "*" @markup.heading.5.marker (#set! conceal "")
text: (_) @label)
(taglink
- "|" @conceal (#set! conceal "")
- text: (_) @text.reference)
+ "|" @markup.link (#set! conceal "")
+ text: (_) @markup.link)
(optionlink
- text: (_) @text.reference)
+ text: (_) @markup.link)
(codespan
- "`" @conceal (#set! conceal "")
- text: (_) @text.literal)
-((codeblock) @text.literal.block (#set! "priority" 90))
+ "`" @markup.raw (#set! conceal "")
+ text: (_) @markup.raw)
+((codeblock) @markup.raw.block (#set! "priority" 90))
(codeblock
- [">" (language)] @conceal (#set! conceal ""))
+ [">" (language)] @markup.raw.block (#set! conceal ""))
(block
- "<" @conceal (#set! conceal ""))
-(argument) @parameter
+ "<" @markup.raw.block (#set! conceal ""))
+(argument) @variable.parameter
(keycode) @string.special
-(url) @text.uri
-((note) @text.note
- (#any-of? @text.note "Note:" "NOTE:" "Notes:"))
-((note) @text.warning
- (#any-of? @text.warning "Warning:" "WARNING:"))
-((note) @text.danger
- (#any-of? @text.danger "Deprecated:" "DEPRECATED:"))
+(url) @string.special.url
+((note) @comment.hint
+ (#any-of? @comment.hint "Note:" "NOTE:" "Notes:"))
+((note) @comment.warning
+ (#any-of? @comment.warning "Warning:" "WARNING:"))
+((note) @comment.error
+ (#any-of? @comment.error "Deprecated:" "DEPRECATED:"))
diff --git a/queries/vue/highlights.scm b/queries/vue/highlights.scm
index ae89d65a0..e53ef4b8a 100644
--- a/queries/vue/highlights.scm
+++ b/queries/vue/highlights.scm
@@ -20,4 +20,4 @@
[
(directive_modifier)
(directive_argument)
-] @method
+] @function.method
diff --git a/queries/wgsl/highlights.scm b/queries/wgsl/highlights.scm
index c440bf0fe..6e190f06e 100644
--- a/queries/wgsl/highlights.scm
+++ b/queries/wgsl/highlights.scm
@@ -1,6 +1,6 @@
(identifier) @variable
(int_literal) @number
-(float_literal) @float
+(float_literal) @number.float
(bool_literal) @boolean
(type_declaration) @type
@@ -9,13 +9,13 @@
(identifier) @function)
(parameter
- (variable_identifier_declaration (identifier) @parameter))
+ (variable_identifier_declaration (identifier) @variable.parameter))
(struct_declaration
(identifier) @type)
(struct_declaration
- (struct_member (variable_identifier_declaration (identifier) @field)))
+ (struct_member (variable_identifier_declaration (identifier) @variable.member)))
(type_constructor_or_function_call_expression
(type_declaration) @function.call)
@@ -38,7 +38,7 @@
"storage"
"uniform"
"workgroup"
-] @storageclass
+] @keyword.storage
[
"read"
@@ -61,7 +61,7 @@
"break"
"continue"
"continuing"
-] @repeat
+] @keyword.repeat
[
"if"
@@ -69,7 +69,7 @@
"switch"
"case"
"default"
-] @conditional
+] @keyword.conditional
[
"&"
diff --git a/queries/wgsl_bevy/highlights.scm b/queries/wgsl_bevy/highlights.scm
index 4ba25a935..d14276733 100644
--- a/queries/wgsl_bevy/highlights.scm
+++ b/queries/wgsl_bevy/highlights.scm
@@ -9,7 +9,7 @@
"#import"
"#define_import_path"
"as"
-] @include
+] @keyword.import
"::" @punctuation.delimiter
@@ -17,13 +17,13 @@
(import_path
((identifier) @function .)))
-(import_path (identifier) @namespace (identifier))
+(import_path (identifier) @module (identifier))
(struct_declaration
- (preproc_ifdef (struct_member (variable_identifier_declaration (identifier) @field))))
+ (preproc_ifdef (struct_member (variable_identifier_declaration (identifier) @variable.member))))
(struct_declaration
(preproc_ifdef
- (preproc_else (struct_member (variable_identifier_declaration (identifier) @field)))))
+ (preproc_else (struct_member (variable_identifier_declaration (identifier) @variable.member)))))
(preproc_ifdef
name: (identifier) @constant.macro)
@@ -33,4 +33,4 @@
"#ifndef"
"#endif"
"#else"
-] @preproc
+] @keyword.directive
diff --git a/queries/wing/highlights.scm b/queries/wing/highlights.scm
index af5ef6ed6..3ef530746 100644
--- a/queries/wing/highlights.scm
+++ b/queries/wing/highlights.scm
@@ -6,22 +6,22 @@
(custom_type) @type
(class_field
- name: (identifier) @field)
+ name: (identifier) @variable.member)
(class_definition
name: (identifier) @type)
(method_definition
- name: (identifier) @method)
+ name: (identifier) @function.method)
; Functions
-(keyword_argument_key) @parameter
+(keyword_argument_key) @variable.parameter
(call
caller: (reference
(nested_identifier
- property: (member_identifier) @method.call)))
+ property: (member_identifier) @function.method.call)))
(call
caller: (reference
- (reference_identifier) @method.call))
+ (reference_identifier) @function.method.call))
; Primitives
diff --git a/queries/xcompose/highlights.scm b/queries/xcompose/highlights.scm
index 48366985d..811a67b1d 100644
--- a/queries/xcompose/highlights.scm
+++ b/queries/xcompose/highlights.scm
@@ -5,7 +5,7 @@
(text) @string
-"include" @include
+"include" @keyword.import
[ (octal) (hex) ] @number
diff --git a/queries/xml/highlights.scm b/queries/xml/highlights.scm
index e47636ac4..aa913352e 100644
--- a/queries/xml/highlights.scm
+++ b/queries/xml/highlights.scm
@@ -8,9 +8,9 @@
;; Processing instructions
-(XmlModelPI "xml-model" @preproc)
+(XmlModelPI "xml-model" @keyword.directive)
-(StyleSheetPI "xml-stylesheet" @preproc)
+(StyleSheetPI "xml-stylesheet" @keyword.directive)
(PseudoAtt (Name) @tag.attribute)
@@ -18,7 +18,7 @@
;; Doctype declaration
-(doctypedecl "DOCTYPE" @define)
+(doctypedecl "DOCTYPE" @keyword.directive.define)
(doctypedecl (Name) @type.definition)
@@ -38,12 +38,12 @@
;; Text
-(CharData) @text @spell
+(CharData) @none @spell
((CDSect
- (CDStart) @text.environment
- (CData) @text.literal
- "]]>" @text.environment)
+ (CDStart) @markup.environment
+ (CData) @markup.raw
+ "]]>" @markup.environment)
(#set! "priority" 105))
;; Delimiters & punctuation
diff --git a/queries/yaml/highlights.scm b/queries/yaml/highlights.scm
index 0fa633dbd..03234a5ce 100644
--- a/queries/yaml/highlights.scm
+++ b/queries/yaml/highlights.scm
@@ -16,17 +16,17 @@
(yaml_directive)
(tag_directive)
(reserved_directive)
-] @preproc
+] @keyword.directive
(block_mapping_pair
- key: (flow_node [(double_quote_scalar) (single_quote_scalar)] @field))
+ key: (flow_node [(double_quote_scalar) (single_quote_scalar)] @variable.member))
(block_mapping_pair
- key: (flow_node (plain_scalar (string_scalar) @field)))
+ key: (flow_node (plain_scalar (string_scalar) @variable.member)))
(flow_mapping
- (_ key: (flow_node [(double_quote_scalar) (single_quote_scalar)] @field)))
+ (_ key: (flow_node [(double_quote_scalar) (single_quote_scalar)] @variable.member)))
(flow_mapping
- (_ key: (flow_node (plain_scalar (string_scalar) @field))))
+ (_ key: (flow_node (plain_scalar (string_scalar) @variable.member))))
[
","
diff --git a/queries/yang/highlights.scm b/queries/yang/highlights.scm
index c2c302a71..33e5517c3 100644
--- a/queries/yang/highlights.scm
+++ b/queries/yang/highlights.scm
@@ -6,7 +6,7 @@
; Keywords
(statement_keyword) @keyword
-(statement_keyword "import") @include
+(statement_keyword "import") @keyword.import
(extension_keyword) @function
; Arguments
@@ -24,7 +24,7 @@
(string) @string
(string (escape_sequence) @string.escape)
(unquoted_string) @string
-(keypath) @string.special
+(keypath) @string.special.path
; Always highlight the value of an enum statement as a string
(enum_value) @string
@@ -35,7 +35,7 @@
(argument (string) @string.special))
(statement
(statement_keyword "pattern")
- (argument (string) @string.regex))
+ (argument (string) @string.regexp))
; Punctuation
(plus_symbol) @operator
diff --git a/queries/yuck/highlights.scm b/queries/yuck/highlights.scm
index 16e90441f..c885d909d 100644
--- a/queries/yuck/highlights.scm
+++ b/queries/yuck/highlights.scm
@@ -7,8 +7,8 @@
; Includes
(list .
- ((symbol) @include
- (#eq? @include "include")))
+ ((symbol) @keyword.import
+ (#eq? @keyword.import "include")))
; Keywords
@@ -20,9 +20,9 @@
; Loop
-(loop_widget . "for" @repeat . (symbol) @variable . "in" @keyword.operator)
+(loop_widget . "for" @keyword.repeat . (symbol) @variable . "in" @keyword.operator)
-(loop_widget . "for" @repeat . (symbol) @variable . "in" @keyword.operator . (symbol) @variable)
+(loop_widget . "for" @keyword.repeat . (symbol) @variable . "in" @keyword.operator . (symbol) @variable)
; Builtin widgets
@@ -84,7 +84,7 @@
(json_object
(simplexpr
- (ident) @field))
+ (ident) @variable.member))
; Functions
@@ -121,13 +121,13 @@
; Ternary expression
(ternary_expression
- ["?" ":"] @conditional.ternary)
+ ["?" ":"] @keyword.conditional.ternary)
; Literals
(number) @number
-(float) @float
+(float) @number.float
(boolean) @boolean
diff --git a/queries/zig/highlights.scm b/queries/zig/highlights.scm
index 9ba764b10..875235412 100644
--- a/queries/zig/highlights.scm
+++ b/queries/zig/highlights.scm
@@ -10,12 +10,12 @@
variable_type_function: (IDENTIFIER)
] @variable
-parameter: (IDENTIFIER) @parameter
+parameter: (IDENTIFIER) @variable.parameter
[
field_member: (IDENTIFIER)
field_access: (IDENTIFIER)
-] @field
+] @variable.member
;; assume TitleCase is a type
(
@@ -48,7 +48,7 @@ parameter: (IDENTIFIER) @parameter
function: (IDENTIFIER) @function
function_call: (IDENTIFIER) @function.call
-exception: "!" @exception
+exception: "!" @keyword.exception
(
(IDENTIFIER) @variable.builtin
@@ -71,12 +71,12 @@ field_constant: (IDENTIFIER) @constant
(BUILTINIDENTIFIER) @function.builtin
-((BUILTINIDENTIFIER) @include
- (#any-of? @include "@import" "@cImport"))
+((BUILTINIDENTIFIER) @keyword.import
+ (#any-of? @keyword.import "@import" "@cImport"))
(INTEGER) @number
-(FLOAT) @float
+(FLOAT) @number.float
[
"true"
@@ -133,23 +133,23 @@ field_constant: (IDENTIFIER) @constant
"if"
"else"
"switch"
-] @conditional
+] @keyword.conditional
[
"for"
"while"
"break"
"continue"
-] @repeat
+] @keyword.repeat
[
"usingnamespace"
-] @include
+] @keyword.import
[
"try"
"catch"
-] @exception
+] @keyword.exception
[
"anytype"
@@ -169,7 +169,7 @@ field_constant: (IDENTIFIER) @constant
"align"
"callconv"
"linksection"
-] @storageclass
+] @keyword.storage
[
"comptime"