nvim-treesitter/queries/vim/highlights.scm

354 lines
4.3 KiB
Scheme
Raw Normal View History

2021-08-20 13:35:04 -05:00
(identifier) @variable
2024-01-06 15:05:50 +09:00
((identifier) @constant
(#lua-match? @constant "^[A-Z][A-Z_0-9]*$"))
2021-04-18 09:57:02 +02:00
2024-01-06 15:05:50 +09:00
; Keywords
2021-04-18 09:57:02 +02:00
[
"if"
"else"
"elseif"
"endif"
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`
2023-12-24 10:00:20 +01:00
] @keyword.conditional
2021-04-18 09:57:02 +02:00
[
"try"
"catch"
"finally"
"endtry"
"throw"
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`
2023-12-24 10:00:20 +01:00
] @keyword.exception
2021-04-18 09:57:02 +02:00
[
"for"
"endfor"
"in"
"while"
"endwhile"
2022-08-17 11:09:14 +02:00
"break"
"continue"
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`
2023-12-24 10:00:20 +01:00
] @keyword.repeat
2021-04-18 09:57:02 +02:00
[
"function"
"endfunction"
] @keyword.function
2024-01-06 15:05:50 +09:00
; Function related
(function_declaration
name: (_) @function)
(call_expression
function: (identifier) @function.call)
(call_expression
function: (scoped_identifier
(identifier) @function.call))
2024-01-06 15:05:50 +09:00
(parameters
(identifier) @variable.parameter)
(default_parameter
(identifier) @variable.parameter)
[
(bang)
(spread)
] @punctuation.special
2021-04-18 09:57:02 +02:00
2024-01-06 15:05:50 +09:00
[
(no_option)
(inv_option)
(default_option)
(option_name)
] @variable.builtin
2021-04-18 09:57:02 +02:00
2021-08-20 13:35:04 -05:00
[
(scope)
"a:"
"$"
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`
2023-12-24 10:00:20 +01:00
] @module
2021-04-18 09:57:02 +02:00
2024-01-06 15:05:50 +09:00
; Commands and user defined commands
2021-04-18 09:57:02 +02:00
[
"let"
"unlet"
2022-05-01 19:19:39 +02:00
"const"
2021-04-18 09:57:02 +02:00
"call"
"execute"
"normal"
"set"
"setfiletype"
"setlocal"
2021-04-18 09:57:02 +02:00
"silent"
"echo"
"echon"
"echohl"
"echomsg"
"echoerr"
2021-04-18 09:57:02 +02:00
"autocmd"
2021-08-20 14:44:24 +02:00
"augroup"
2021-04-18 09:57:02 +02:00
"return"
"syntax"
2022-10-15 10:54:43 +02:00
"filetype"
"source"
2021-04-18 09:57:02 +02:00
"lua"
"ruby"
"perl"
"python"
"highlight"
2022-08-23 14:17:55 +02:00
"command"
2022-01-19 16:31:29 +01:00
"delcommand"
"comclear"
"colorscheme"
"scriptencoding"
"startinsert"
"stopinsert"
"global"
"runtime"
"wincmd"
2022-08-23 14:17:55 +02:00
"cnext"
"cprevious"
"cNext"
"vertical"
"leftabove"
"aboveleft"
"rightbelow"
"belowright"
"topleft"
"botright"
(unknown_command_name)
2022-08-26 20:20:49 +02:00
"edit"
"enew"
"find"
"ex"
"visual"
"view"
2022-11-21 11:00:23 +00:00
"eval"
"sign"
"abort"
2021-04-18 09:57:02 +02:00
] @keyword
2024-01-06 15:05:50 +09:00
(map_statement
cmd: _ @keyword)
2024-01-24 18:14:19 +02:00
(keycode) @character.special
(command_name) @function.macro
2021-04-18 09:57:02 +02:00
2024-01-06 15:05:50 +09:00
; Filetype command
(filetype_statement
[
"detect"
"plugin"
"indent"
"on"
"off"
] @keyword)
; Syntax command
(syntax_statement
(keyword) @string)
(syntax_statement
[
"enable"
"on"
"off"
"reset"
"case"
"spell"
"foldlevel"
"iskeyword"
"keyword"
"match"
"cluster"
"region"
"clear"
"include"
] @keyword)
(syntax_argument
name: _ @keyword)
2022-01-19 16:31:29 +01:00
2021-08-20 10:05:34 +02:00
[
"<buffer>"
"<nowait>"
"<silent>"
"<script>"
"<expr>"
"<unique>"
] @constant.builtin
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`
2023-12-24 10:00:20 +01:00
(augroup_name) @module
(au_event) @constant
2021-04-18 09:57:02 +02:00
2024-01-06 15:05:50 +09:00
(normal_statement
(commands) @constant)
2024-01-06 15:05:50 +09:00
; Highlight command
2022-09-07 09:30:00 +02:00
(hl_attribute
key: _ @property
val: _ @constant)
(hl_group) @type
2024-01-06 15:05:50 +09:00
(highlight_statement
[
"default"
"link"
"clear"
] @keyword)
2022-08-23 14:17:55 +02:00
2024-01-06 15:05:50 +09:00
; Command command
2022-09-07 09:30:00 +02:00
(command) @string
2022-08-23 14:17:55 +02:00
(command_attribute
2022-08-26 20:20:49 +02:00
name: _ @property
val: (behavior
name: _ @constant
val: (identifier)? @function)?)
2022-08-26 20:20:49 +02:00
2024-01-06 15:05:50 +09:00
; Edit command
2022-08-26 20:20:49 +02:00
(plus_plus_opt
val: _? @constant) @property
2024-01-06 15:05:50 +09:00
(plus_cmd
"+" @property) @property
2024-01-06 15:05:50 +09:00
; Runtime command
(runtime_statement
(where) @keyword.operator)
2024-01-06 15:05:50 +09:00
; Colorscheme command
(colorscheme_statement
(name) @string)
2024-01-06 15:05:50 +09:00
; Scriptencoding command
(scriptencoding_statement
(encoding) @string.special)
2021-04-18 09:57:02 +02:00
2024-01-06 15:05:50 +09:00
; Literals
2021-04-18 09:57:02 +02:00
(string_literal) @string
2024-01-06 15:05:50 +09:00
2021-04-18 09:57:02 +02:00
(integer_literal) @number
2024-01-06 15:05:50 +09:00
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`
2023-12-24 10:00:20 +01:00
(float_literal) @number.float
2024-01-06 15:05:50 +09:00
2022-09-07 09:30:00 +02:00
(comment) @comment @spell
2024-01-06 15:05:50 +09:00
2022-11-21 11:00:23 +00:00
(line_continuation_comment) @comment @spell
2024-01-06 15:05:50 +09:00
(pattern) @string.special
2024-01-06 15:05:50 +09:00
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`
2023-12-24 10:00:20 +01:00
(pattern_multi) @string.regexp
2024-01-06 15:05:50 +09:00
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`
2023-12-24 10:00:20 +01:00
(filename) @string.special.path
2021-04-18 09:57:02 +02:00
2024-01-06 15:05:50 +09:00
(heredoc
(body) @string)
2021-04-18 09:57:02 +02:00
2024-01-06 15:05:50 +09:00
(heredoc
(parameter) @keyword)
[
(marker_definition)
(endmarker)
] @label
(literal_dictionary
(literal_key) @property)
2024-01-06 15:05:50 +09:00
((scoped_identifier
(scope) @_scope
.
(identifier) @boolean)
(#eq? @_scope "v:")
(#any-of? @boolean "true" "false"))
; Operators
2021-04-18 09:57:02 +02:00
[
"||"
"&&"
2021-08-20 13:35:04 -05:00
"&"
2021-04-18 09:57:02 +02:00
"+"
"-"
"*"
"/"
"%"
".."
"=="
"!="
">"
">="
"<"
"<="
"=~"
"!~"
"="
"+="
"-="
"*="
"/="
"%="
".="
2022-08-26 20:20:49 +02:00
"..="
2022-11-21 11:00:23 +00:00
"<<"
"=<<"
"->"
2022-11-21 11:00:23 +00:00
(match_case)
2021-04-18 09:57:02 +02:00
] @operator
[
"is"
"isnot"
] @keyword.operator
2021-04-18 09:57:02 +02:00
; Some characters have different meanings based on the context
2024-01-06 15:05:50 +09:00
(unary_operation
"!" @operator)
2021-08-16 17:19:35 +02:00
2024-01-06 15:05:50 +09:00
(binary_operation
"." @operator)
2022-11-21 11:00:23 +00:00
2024-01-06 15:05:50 +09:00
; Punctuation
2021-08-16 17:19:35 +02:00
[
"("
")"
"{"
"}"
"["
"]"
2022-11-21 11:00:23 +00:00
"#{"
2021-08-16 17:19:35 +02:00
] @punctuation.bracket
2024-01-06 15:05:50 +09:00
(field_expression
"." @punctuation.delimiter)
2021-08-20 13:35:04 -05:00
[
","
":"
] @punctuation.delimiter
2024-01-06 15:05:50 +09:00
(ternary_expression
[
"?"
":"
] @keyword.conditional.ternary)
2021-08-20 13:35:04 -05:00
; Options
((set_value) @number
2024-01-06 15:05:50 +09:00
(#lua-match? @number "^[%d]+(%.[%d]+)?$"))
(inv_option
"!" @operator)
2021-09-25 00:17:46 -05:00
2024-01-06 15:05:50 +09:00
(set_item
"?" @operator)
2022-11-21 11:00:23 +00:00
2021-09-25 00:17:46 -05:00
((set_item
2024-01-06 15:05:50 +09:00
option: (option_name) @_option
value: (set_value) @function)
(#any-of? @_option "tagfunc" "tfu" "completefunc" "cfu" "omnifunc" "ofu" "operatorfunc" "opfunc"))