spacevim/bundle/nvim-treesitter-0.9.1/queries/odin/highlights.scm
JIe 2bb7059579
Some checks failed
Detach Plugins / check (FlyGrep.vim) (push) Has been cancelled
Detach Plugins / check (GitHub.vim) (push) Has been cancelled
Detach Plugins / check (JavaUnit.vim) (push) Has been cancelled
Detach Plugins / check (SourceCounter.vim) (push) Has been cancelled
Detach Plugins / check (cpicker.nvim) (push) Has been cancelled
Detach Plugins / check (dein-ui.vim) (push) Has been cancelled
Detach Plugins / check (git.vim) (push) Has been cancelled
Detach Plugins / check (iedit.vim) (push) Has been cancelled
Detach Plugins / check (scrollbar.vim) (push) Has been cancelled
Detach Plugins / check (vim-chat) (push) Has been cancelled
Detach Plugins / check (vim-cheat) (push) Has been cancelled
Detach Plugins / check (vim-todo) (push) Has been cancelled
Detach Plugins / check (xmake.vim) (push) Has been cancelled
test / Linux (nvim, nightly) (push) Has been cancelled
test / Linux (nvim, v0.3.8) (push) Has been cancelled
test / Linux (nvim, v0.4.0) (push) Has been cancelled
test / Linux (nvim, v0.4.2) (push) Has been cancelled
test / Linux (nvim, v0.4.3) (push) Has been cancelled
test / Linux (nvim, v0.4.4) (push) Has been cancelled
test / Linux (nvim, v0.5.0) (push) Has been cancelled
test / Linux (nvim, v0.5.1) (push) Has been cancelled
test / Linux (nvim, v0.6.0) (push) Has been cancelled
test / Linux (nvim, v0.6.1) (push) Has been cancelled
test / Linux (nvim, v0.7.0) (push) Has been cancelled
test / Linux (nvim, v0.7.2) (push) Has been cancelled
test / Linux (nvim, v0.8.0) (push) Has been cancelled
test / Linux (nvim, v0.8.1) (push) Has been cancelled
test / Linux (nvim, v0.8.2) (push) Has been cancelled
test / Linux (nvim, v0.8.3) (push) Has been cancelled
test / Linux (nvim, v0.9.0) (push) Has been cancelled
test / Linux (nvim, v0.9.1) (push) Has been cancelled
test / Linux (true, vim, v7.4.052) (push) Has been cancelled
test / Linux (true, vim, v7.4.1689) (push) Has been cancelled
test / Linux (true, vim, v7.4.629) (push) Has been cancelled
test / Linux (true, vim, v8.0.0027) (push) Has been cancelled
test / Linux (true, vim, v8.0.0183) (push) Has been cancelled
test / Linux (vim, nightly) (push) Has been cancelled
test / Linux (vim, v8.0.0184) (push) Has been cancelled
test / Linux (vim, v8.0.1453) (push) Has been cancelled
test / Linux (vim, v8.1.2269) (push) Has been cancelled
test / Linux (vim, v8.2.2434) (push) Has been cancelled
test / Linux (vim, v8.2.3995) (push) Has been cancelled
test / Windows (nvim, nightly) (push) Has been cancelled
test / Windows (nvim, v0.3.8) (push) Has been cancelled
test / Windows (nvim, v0.4.2) (push) Has been cancelled
test / Windows (nvim, v0.4.3) (push) Has been cancelled
test / Windows (nvim, v0.4.4) (push) Has been cancelled
test / Windows (nvim, v0.5.0) (push) Has been cancelled
test / Windows (nvim, v0.5.1) (push) Has been cancelled
test / Windows (nvim, v0.6.0) (push) Has been cancelled
test / Windows (nvim, v0.6.1) (push) Has been cancelled
test / Windows (nvim, v0.7.0) (push) Has been cancelled
test / Windows (nvim, v0.7.2) (push) Has been cancelled
test / Windows (nvim, v0.8.0) (push) Has been cancelled
test / Windows (nvim, v0.8.1) (push) Has been cancelled
test / Windows (nvim, v0.8.2) (push) Has been cancelled
test / Windows (nvim, v0.8.3) (push) Has been cancelled
test / Windows (nvim, v0.9.0) (push) Has been cancelled
test / Windows (nvim, v0.9.1) (push) Has been cancelled
test / Windows (vim, nightly) (push) Has been cancelled
test / Windows (vim, v7.4.1185) (push) Has been cancelled
test / Windows (vim, v7.4.1689) (push) Has been cancelled
test / Windows (vim, v8.0.0027) (push) Has been cancelled
test / Windows (vim, v8.0.1453) (push) Has been cancelled
test / Windows (vim, v8.1.2269) (push) Has been cancelled
test / Windows (vim, v8.2.2434) (push) Has been cancelled
test / Windows (vim, v8.2.3995) (push) Has been cancelled
docker / docker (push) Has been cancelled
mirror / check (coding) (push) Has been cancelled
mirror / check (gitee) (push) Has been cancelled
mirror / check (gitlab) (push) Has been cancelled
init
2024-08-21 14:17:26 +08:00

294 lines
4.2 KiB
Scheme

; Preprocs
[
(calling_convention)
(tag)
] @preproc
; Includes
[
"import"
"package"
] @include
; Keywords
[
"foreign"
"using"
"struct"
"enum"
"union"
"defer"
"cast"
"transmute"
"auto_cast"
"map"
"bit_set"
"matrix"
] @keyword
[
"proc"
] @keyword.function
[
"return"
"or_return"
] @keyword.return
[
"distinct"
"dynamic"
] @storageclass
; Conditionals
[
"if"
"else"
"when"
"switch"
"case"
"where"
"break"
(fallthrough_statement)
] @conditional
((ternary_expression
[
"?"
":"
"if"
"else"
"when"
] @conditional.ternary)
(#set! "priority" 105))
; Repeats
[
"for"
"do"
"continue"
] @repeat
; Variables
(identifier) @variable
; Namespaces
(package_declaration (identifier) @namespace)
(import_declaration alias: (identifier) @namespace)
(foreign_block (identifier) @namespace)
(using_statement (identifier) @namespace)
; Parameters
(parameter (identifier) @parameter ":" "="? (identifier)? @constant)
(default_parameter (identifier) @parameter ":=")
(named_type (identifier) @parameter)
(call_expression argument: (identifier) @parameter "=")
; Functions
(procedure_declaration (identifier) @type)
(procedure_declaration (identifier) @function (procedure (block)))
(procedure_declaration (identifier) @function (procedure (uninitialized)))
(overloaded_procedure_declaration (identifier) @function)
(call_expression function: (identifier) @function.call)
; Types
(type (identifier) @type)
((type (identifier) @type.builtin)
(#any-of? @type.builtin
"bool" "byte" "b8" "b16" "b32" "b64"
"int" "i8" "i16" "i32" "i64" "i128"
"uint" "u8" "u16" "u32" "u64" "u128" "uintptr"
"i16le" "i32le" "i64le" "i128le" "u16le" "u32le" "u64le" "u128le"
"i16be" "i32be" "i64be" "i128be" "u16be" "u32be" "u64be" "u128be"
"float" "double" "f16" "f32" "f64" "f16le" "f32le" "f64le" "f16be" "f32be" "f64be"
"complex32" "complex64" "complex128" "complex_float" "complex_double"
"quaternion64" "quaternion128" "quaternion256"
"rune" "string" "cstring" "rawptr" "typeid" "any"))
"..." @type.builtin
(struct_declaration (identifier) @type "::")
(enum_declaration (identifier) @type "::")
(union_declaration (identifier) @type "::")
(const_declaration (identifier) @type "::" [(array_type) (distinct_type) (bit_set_type) (pointer_type)])
(struct . (identifier) @type)
(field_type . (identifier) @namespace "." (identifier) @type)
(bit_set_type (identifier) @type ";")
(procedure_type (parameters (parameter (identifier) @type)))
(polymorphic_parameters (identifier) @type)
((identifier) @type
(#lua-match? @type "^[A-Z][a-zA-Z0-9]*$")
(#not-has-parent? @type parameter procedure_declaration))
; Fields
(member_expression "." (identifier) @field)
(struct_type "{" (identifier) @field)
(struct_field (identifier) @field "="?)
(field (identifier) @field)
; Constants
((identifier) @constant
(#lua-match? @constant "^_*[A-Z][A-Z0-9_]*$")
(#not-has-parent? @constant type parameter))
(member_expression . "." (identifier) @constant)
(enum_declaration "{" (identifier) @constant)
; Macros
((call_expression function: (identifier) @function.macro)
(#lua-match? @function.macro "^_*[A-Z][A-Z0-9_]*$"))
; Attributes
(attribute (identifier) @attribute "="?)
; Labels
(label_statement (identifier) @label ":")
; Literals
(number) @number
(float) @float
(string) @string
(character) @character
(escape_sequence) @string.escape
(boolean) @boolean
[
(uninitialized)
(nil)
] @constant.builtin
((identifier) @variable.builtin
(#any-of? @variable.builtin "context" "self"))
; Operators
[
":="
"="
"+"
"-"
"*"
"/"
"%"
"%%"
">"
">="
"<"
"<="
"=="
"!="
"~="
"|"
"~"
"&"
"&~"
"<<"
">>"
"||"
"&&"
"!"
"^"
".."
"+="
"-="
"*="
"/="
"%="
"&="
"|="
"^="
"<<="
">>="
"||="
"&&="
"&~="
"..="
"..<"
"?"
] @operator
[
"or_else"
"in"
"not_in"
] @keyword.operator
; Punctuation
[ "{" "}" ] @punctuation.bracket
[ "(" ")" ] @punctuation.bracket
[ "[" "]" ] @punctuation.bracket
[
"::"
"->"
"."
","
":"
(separator)
] @punctuation.delimiter
[
"@"
"$"
] @punctuation.special
; Comments
[
(comment)
(block_comment)
] @comment @spell
; Errors
(ERROR) @error