2024-01-06 15:05:50 +09:00
|
|
|
((source_file
|
|
|
|
|
.
|
|
|
|
|
(comment) @keyword.directive)
|
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
|
|
|
(#lua-match? @keyword.directive "^#!/"))
|
2022-02-21 15:30:35 +00:00
|
|
|
|
2024-01-06 15:05:50 +09:00
|
|
|
[
|
|
|
|
|
"use"
|
|
|
|
|
"no"
|
|
|
|
|
"require"
|
|
|
|
|
] @keyword.import
|
2022-02-21 15:30:35 +00:00
|
|
|
|
2024-01-06 15:05:50 +09:00
|
|
|
[
|
|
|
|
|
"if"
|
|
|
|
|
"elsif"
|
|
|
|
|
"unless"
|
|
|
|
|
"else"
|
|
|
|
|
] @keyword.conditional
|
|
|
|
|
|
|
|
|
|
(conditional_expression
|
|
|
|
|
[
|
|
|
|
|
"?"
|
|
|
|
|
":"
|
|
|
|
|
] @keyword.conditional.ternary)
|
2023-10-17 19:32:09 +00:00
|
|
|
|
2024-01-06 15:05:50 +09:00
|
|
|
[
|
|
|
|
|
"while"
|
|
|
|
|
"until"
|
|
|
|
|
"for"
|
|
|
|
|
"foreach"
|
|
|
|
|
] @keyword.repeat
|
2022-02-21 15:30:35 +00:00
|
|
|
|
2023-10-17 19:32:09 +00:00
|
|
|
"return" @keyword.return
|
2022-02-21 15:30:35 +00:00
|
|
|
|
2023-10-17 19:32:09 +00:00
|
|
|
"sub" @keyword.function
|
2022-02-21 15:30:35 +00:00
|
|
|
|
2024-01-06 15:05:50 +09:00
|
|
|
[
|
|
|
|
|
"map"
|
|
|
|
|
"grep"
|
|
|
|
|
"sort"
|
|
|
|
|
] @function.builtin
|
2022-02-21 15:30:35 +00: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
|
|
|
"package" @keyword.import
|
2022-02-21 15:30:35 +00:00
|
|
|
|
2021-08-28 17:16:35 +09:00
|
|
|
[
|
2023-10-17 19:32:09 +00:00
|
|
|
"do"
|
2024-01-06 15:05:50 +09:00
|
|
|
"my"
|
|
|
|
|
"our"
|
|
|
|
|
"local"
|
|
|
|
|
"state"
|
|
|
|
|
"last"
|
|
|
|
|
"next"
|
|
|
|
|
"redo"
|
|
|
|
|
"goto"
|
2023-10-17 19:32:09 +00:00
|
|
|
"undef"
|
|
|
|
|
] @keyword
|
|
|
|
|
|
2024-01-06 15:05:50 +09:00
|
|
|
(_
|
|
|
|
|
operator: _ @operator)
|
|
|
|
|
|
2023-10-17 19:32:09 +00:00
|
|
|
"\\" @operator
|
|
|
|
|
|
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
|
|
|
(yadayada) @keyword.exception
|
2023-10-17 19:32:09 +00:00
|
|
|
|
2024-01-06 15:05:50 +09:00
|
|
|
(phaser_statement
|
|
|
|
|
phase: _ @keyword.phaser)
|
2021-08-28 17:16:35 +09:00
|
|
|
|
|
|
|
|
[
|
2024-01-06 15:05:50 +09:00
|
|
|
"or"
|
|
|
|
|
"and"
|
|
|
|
|
"eq"
|
|
|
|
|
"ne"
|
|
|
|
|
"cmp"
|
|
|
|
|
"lt"
|
|
|
|
|
"le"
|
|
|
|
|
"ge"
|
|
|
|
|
"gt"
|
2023-10-17 19:32:09 +00:00
|
|
|
"isa"
|
|
|
|
|
] @keyword.operator
|
2021-08-28 17:16:35 +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
|
|
|
(eof_marker) @keyword.directive
|
2024-01-06 15:05:50 +09:00
|
|
|
|
2023-10-17 19:32:09 +00:00
|
|
|
(data_section) @comment
|
|
|
|
|
|
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
|
|
|
(pod) @none
|
2023-08-03 13:49:22 +03:00
|
|
|
|
2022-02-21 15:30:35 +00:00
|
|
|
[
|
2023-10-17 19:32:09 +00:00
|
|
|
(number)
|
|
|
|
|
(version)
|
2022-02-21 15:30:35 +00:00
|
|
|
] @number
|
2021-08-28 17:16:35 +09:00
|
|
|
|
|
|
|
|
[
|
2024-01-06 15:05:50 +09:00
|
|
|
(string_literal)
|
|
|
|
|
(interpolated_string_literal)
|
|
|
|
|
(quoted_word_list)
|
|
|
|
|
(command_string)
|
2023-10-17 19:32:09 +00:00
|
|
|
(heredoc_content)
|
|
|
|
|
(replacement)
|
|
|
|
|
(transliteration_content)
|
|
|
|
|
] @string
|
2021-08-28 17:16:35 +09:00
|
|
|
|
2023-10-17 19:32:09 +00:00
|
|
|
[
|
|
|
|
|
(heredoc_token)
|
|
|
|
|
(command_heredoc_token)
|
|
|
|
|
(heredoc_end)
|
|
|
|
|
] @label
|
2021-08-28 17:16:35 +09:00
|
|
|
|
2024-01-06 15:05:50 +09:00
|
|
|
[
|
|
|
|
|
(escape_sequence)
|
|
|
|
|
(escaped_delimiter)
|
|
|
|
|
] @string.escape
|
|
|
|
|
|
|
|
|
|
(_
|
|
|
|
|
modifiers: _ @character.special)
|
2022-02-21 15:30:35 +00:00
|
|
|
|
2024-01-06 15:05:50 +09:00
|
|
|
[
|
|
|
|
|
(quoted_regexp)
|
|
|
|
|
(match_regexp)
|
|
|
|
|
(regexp_content)
|
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
|
|
|
] @string.regexp
|
2022-02-21 15:30:35 +00:00
|
|
|
|
2023-10-23 21:40:18 +03:00
|
|
|
(autoquoted_bareword) @string.special
|
2022-09-18 20:15:23 +03:00
|
|
|
|
2024-01-06 15:05:50 +09:00
|
|
|
(use_statement
|
|
|
|
|
(package) @type)
|
|
|
|
|
|
|
|
|
|
(package_statement
|
|
|
|
|
(package) @type)
|
|
|
|
|
|
|
|
|
|
(require_expression
|
|
|
|
|
(bareword) @type)
|
|
|
|
|
|
|
|
|
|
(subroutine_declaration_statement
|
|
|
|
|
name: (bareword) @function)
|
2021-08-28 17:16:35 +09:00
|
|
|
|
2023-10-17 19:32:09 +00:00
|
|
|
(attribute_name) @attribute
|
2024-01-06 15:05:50 +09:00
|
|
|
|
2023-10-17 19:32:09 +00:00
|
|
|
(attribute_value) @string
|
2022-02-21 15:30:35 +00:00
|
|
|
|
2023-10-17 19:32:09 +00:00
|
|
|
(label) @label
|
2023-08-03 13:49:22 +03:00
|
|
|
|
2024-01-06 15:05:50 +09:00
|
|
|
(statement_label
|
|
|
|
|
label: _ @label)
|
|
|
|
|
|
|
|
|
|
(relational_expression
|
|
|
|
|
operator: "isa"
|
|
|
|
|
right: (bareword) @type)
|
|
|
|
|
|
|
|
|
|
(function_call_expression
|
|
|
|
|
(function) @function.call)
|
2023-08-03 13:49:22 +03:00
|
|
|
|
2024-01-06 15:05:50 +09:00
|
|
|
(method_call_expression
|
|
|
|
|
(method) @function.method.call)
|
2022-02-21 15:30:35 +00:00
|
|
|
|
2024-01-06 15:05:50 +09:00
|
|
|
(method_call_expression
|
|
|
|
|
invocant: (bareword) @type)
|
2022-02-21 15:30:35 +00:00
|
|
|
|
2024-01-06 15:05:50 +09:00
|
|
|
(func0op_call_expression
|
|
|
|
|
function: _ @function.builtin)
|
|
|
|
|
|
|
|
|
|
(func1op_call_expression
|
|
|
|
|
function: _ @function.builtin)
|
2021-08-28 17:16:35 +09:00
|
|
|
|
2023-11-02 19:58:38 +00:00
|
|
|
; this was a regex for the CLI
|
2024-01-06 15:05:50 +09:00
|
|
|
([
|
|
|
|
|
(function)
|
|
|
|
|
(expression_statement
|
|
|
|
|
(bareword))
|
|
|
|
|
] @function.builtin
|
|
|
|
|
(#any-of? @function.builtin "accept" "atan2" "bind" "binmode" "bless" "crypt" "chmod" "chown" "connect" "die" "dbmopen" "exec" "fcntl" "flock" "formline" "getpriority" "getprotobynumber" "gethostbyaddr" "getnetbyaddr" "getservbyname" "getservbyport" "getsockopt" "glob" "index" "ioctl" "join" "kill" "link" "listen" "mkdir" "msgctl" "msgget" "msgrcv" "msgsend" "open" "opendir" "print" "printf" "push" "pack" "pipe" "return" "rename" "rindex" "read" "recv" "reverse" "say" "select" "seek" "semctl" "semget" "semop" "send" "setpgrp" "setpriority" "seekdir" "setsockopt" "shmctl" "shmread" "shmwrite" "shutdown" "socket" "socketpair" "split" "sprintf" "splice" "substr" "system" "symlink" "syscall" "sysopen" "sysseek" "sysread" "syswrite" "tie" "truncate" "unlink" "unpack" "utime" "unshift" "vec" "warn" "waitpid"))
|
2022-02-21 15:30:35 +00:00
|
|
|
|
2023-08-03 13:49:22 +03:00
|
|
|
(function) @function
|
2021-08-28 17:16:35 +09:00
|
|
|
|
2023-10-17 19:32:09 +00:00
|
|
|
(_
|
|
|
|
|
"{" @punctuation.special
|
|
|
|
|
(varname)
|
|
|
|
|
"}" @punctuation.special)
|
2021-08-28 17:16:35 +09:00
|
|
|
|
2024-01-06 15:05:50 +09:00
|
|
|
(varname
|
2023-10-17 19:32:09 +00:00
|
|
|
(block
|
2024-01-06 15:05:50 +09:00
|
|
|
"{" @punctuation.special
|
2023-10-17 19:32:09 +00:00
|
|
|
"}" @punctuation.special))
|
2021-08-28 17:16:35 +09:00
|
|
|
|
2024-01-06 15:05:50 +09:00
|
|
|
([
|
|
|
|
|
(varname)
|
|
|
|
|
(filehandle)
|
|
|
|
|
] @variable.builtin
|
2023-11-02 19:58:38 +00:00
|
|
|
(#any-of? @variable.builtin "ENV" "ARGV" "INC" "ARGVOUT" "SIG" "STDIN" "STDOUT" "STDERR" "a" "b" "_"))
|
2024-01-06 15:05:50 +09:00
|
|
|
|
2023-11-02 19:58:38 +00:00
|
|
|
((varname) @variable.builtin
|
|
|
|
|
; highlights all the reserved ^ vars like ${^THINGS}
|
|
|
|
|
(#lua-match? @variable.builtin "%^"))
|
2024-01-06 15:05:50 +09:00
|
|
|
|
2023-11-02 19:58:38 +00:00
|
|
|
((varname) @variable.builtin
|
|
|
|
|
; highlights punc vars and also numeric only like $11
|
|
|
|
|
(#lua-match? @variable.builtin "^%A+$"))
|
|
|
|
|
|
2023-10-17 19:32:09 +00:00
|
|
|
(scalar) @variable.scalar
|
2024-01-06 15:05:50 +09:00
|
|
|
|
|
|
|
|
(scalar_deref_expression
|
|
|
|
|
[
|
|
|
|
|
"$"
|
|
|
|
|
"*"
|
|
|
|
|
] @variable.scalar)
|
|
|
|
|
|
|
|
|
|
[
|
|
|
|
|
(array)
|
|
|
|
|
(arraylen)
|
|
|
|
|
] @variable.array
|
|
|
|
|
|
|
|
|
|
(array_deref_expression
|
|
|
|
|
[
|
|
|
|
|
"@"
|
|
|
|
|
"*"
|
|
|
|
|
] @variable.array)
|
|
|
|
|
|
2023-10-17 19:32:09 +00:00
|
|
|
(hash) @variable.hash
|
2023-08-03 13:49:22 +03:00
|
|
|
|
2024-01-06 15:05:50 +09:00
|
|
|
(hash_deref_expression
|
|
|
|
|
[
|
|
|
|
|
"%"
|
|
|
|
|
"*"
|
|
|
|
|
] @variable.hash)
|
2021-08-28 17:16:35 +09:00
|
|
|
|
2024-01-06 15:05:50 +09:00
|
|
|
(array_element_expression
|
|
|
|
|
array: (_) @variable.array)
|
2021-08-28 17:16:35 +09:00
|
|
|
|
2024-01-06 15:05:50 +09:00
|
|
|
(slice_expression
|
|
|
|
|
array: (_) @variable.array)
|
|
|
|
|
|
|
|
|
|
(keyval_expression
|
|
|
|
|
array: (_) @variable.array)
|
2021-08-28 17:16:35 +09:00
|
|
|
|
2024-01-06 15:05:50 +09:00
|
|
|
(hash_element_expression
|
|
|
|
|
hash: (_) @variable.hash)
|
|
|
|
|
|
|
|
|
|
(slice_expression
|
|
|
|
|
hash: (_) @variable.hash)
|
|
|
|
|
|
|
|
|
|
(keyval_expression
|
|
|
|
|
hash: (_) @variable.hash)
|
|
|
|
|
|
|
|
|
|
(comment) @comment
|
2021-08-28 17:16:35 +09:00
|
|
|
|
2024-01-06 15:05:50 +09:00
|
|
|
([
|
|
|
|
|
"=>"
|
|
|
|
|
","
|
|
|
|
|
";"
|
|
|
|
|
"->"
|
|
|
|
|
] @punctuation.delimiter)
|
|
|
|
|
|
|
|
|
|
([
|
|
|
|
|
"["
|
|
|
|
|
"]"
|
|
|
|
|
"{"
|
|
|
|
|
"}"
|
|
|
|
|
"("
|
|
|
|
|
")"
|
|
|
|
|
] @punctuation.bracket
|
2023-10-17 19:32:09 +00:00
|
|
|
; priority hack so nvim + ts-cli behave the same
|
|
|
|
|
(#set! "priority" 90))
|