2024-05-03 20:10:58 -04:00
|
|
|
[
|
|
|
|
|
(identifier)
|
|
|
|
|
(preproc_arg)
|
|
|
|
|
] @variable
|
|
|
|
|
|
|
|
|
|
((preproc_arg) @constant.macro
|
|
|
|
|
(#lua-match? @constant.macro "^[_A-Z][_A-Z0-9]*$"))
|
2020-07-18 16:21:20 -07:00
|
|
|
|
2021-08-18 09:49:25 +03:00
|
|
|
((identifier) @keyword
|
|
|
|
|
(#eq? @keyword "value")
|
|
|
|
|
(#has-ancestor? @keyword accessor_declaration))
|
2021-08-17 20:48:29 +03:00
|
|
|
|
2020-07-18 16:21:20 -07:00
|
|
|
(method_declaration
|
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
|
|
|
name: (identifier) @function.method)
|
2020-07-18 16:21:20 -07:00
|
|
|
|
2021-08-05 22:02:01 -04:00
|
|
|
(local_function_statement
|
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
|
|
|
name: (identifier) @function.method)
|
2021-08-05 22:02:01 -04:00
|
|
|
|
2020-07-19 14:31:07 -07:00
|
|
|
(method_declaration
|
2024-05-03 20:10:58 -04:00
|
|
|
returns: [
|
|
|
|
|
(identifier) @type
|
|
|
|
|
(generic_name
|
|
|
|
|
(identifier) @type)
|
|
|
|
|
])
|
|
|
|
|
|
|
|
|
|
(event_declaration
|
2020-07-19 14:31:07 -07:00
|
|
|
type: (identifier) @type)
|
|
|
|
|
|
2024-05-03 20:10:58 -04:00
|
|
|
(event_declaration
|
|
|
|
|
name: (identifier) @variable.member)
|
|
|
|
|
|
|
|
|
|
(event_field_declaration
|
|
|
|
|
(variable_declaration
|
|
|
|
|
(variable_declarator
|
|
|
|
|
name: (identifier) @variable.member)))
|
|
|
|
|
|
2024-01-12 15:13:30 +01:00
|
|
|
(declaration_pattern
|
|
|
|
|
type: (identifier) @type)
|
|
|
|
|
|
2021-08-05 22:02:01 -04:00
|
|
|
(local_function_statement
|
|
|
|
|
type: (identifier) @type)
|
|
|
|
|
|
2021-05-31 22:26:35 +02:00
|
|
|
(interpolation) @none
|
2020-07-19 13:32:32 -07:00
|
|
|
|
2024-01-24 01:11:16 -05:00
|
|
|
(member_access_expression
|
|
|
|
|
name: (identifier) @variable.member)
|
|
|
|
|
|
2021-05-31 22:26:58 +02:00
|
|
|
(invocation_expression
|
2021-06-02 18:16:12 -04:00
|
|
|
(member_access_expression
|
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
|
|
|
name: (identifier) @function.method.call))
|
2021-06-02 18:16:12 -04:00
|
|
|
|
|
|
|
|
(invocation_expression
|
2024-03-21 20:44:35 +09:00
|
|
|
function: (conditional_access_expression
|
|
|
|
|
(member_binding_expression
|
|
|
|
|
name: (identifier) @function.method.call)))
|
2021-05-31 22:26:58 +02:00
|
|
|
|
2021-06-01 19:31:31 +02:00
|
|
|
(namespace_declaration
|
2024-03-21 20:44:35 +09:00
|
|
|
name: [
|
|
|
|
|
(qualified_name)
|
|
|
|
|
(identifier)
|
|
|
|
|
] @module)
|
2021-06-01 19:31:31 +02:00
|
|
|
|
|
|
|
|
(qualified_name
|
|
|
|
|
(identifier) @type)
|
2021-05-31 22:37:10 +02:00
|
|
|
|
2024-01-24 01:11:16 -05:00
|
|
|
(namespace_declaration
|
2024-05-03 20:10:58 -04:00
|
|
|
name: (identifier) @module)
|
|
|
|
|
|
|
|
|
|
(file_scoped_namespace_declaration
|
|
|
|
|
name: (identifier) @module)
|
|
|
|
|
|
|
|
|
|
(qualified_name
|
|
|
|
|
(identifier) @module
|
|
|
|
|
(#not-has-ancestor? @module method_declaration)
|
|
|
|
|
(#not-has-ancestor? @module record_declaration)
|
|
|
|
|
(#has-ancestor? @module namespace_declaration file_scoped_namespace_declaration))
|
2024-01-24 01:11:16 -05:00
|
|
|
|
2021-05-31 22:26:58 +02:00
|
|
|
(invocation_expression
|
2024-01-06 15:05:50 +09:00
|
|
|
(identifier) @function.method.call)
|
2020-07-19 13:32:32 -07:00
|
|
|
|
2021-06-02 18:16:12 -04:00
|
|
|
(field_declaration
|
|
|
|
|
(variable_declaration
|
|
|
|
|
(variable_declarator
|
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
|
|
|
(identifier) @variable.member)))
|
2020-07-19 12:52:50 -07:00
|
|
|
|
2021-06-02 18:16:12 -04:00
|
|
|
(initializer_expression
|
|
|
|
|
(assignment_expression
|
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
|
|
|
left: (identifier) @variable.member))
|
2020-07-19 12:52:50 -07:00
|
|
|
|
2024-05-03 20:10:58 -04:00
|
|
|
(parameter
|
|
|
|
|
name: (identifier) @variable.parameter)
|
|
|
|
|
|
2025-09-18 23:02:03 +08:00
|
|
|
(parameter
|
|
|
|
|
(modifier) @keyword.modifier)
|
|
|
|
|
|
2020-07-18 16:21:20 -07:00
|
|
|
(parameter_list
|
2024-05-03 20:10:58 -04:00
|
|
|
name: (identifier) @variable.parameter)
|
2020-07-18 16:21:20 -07:00
|
|
|
|
2024-05-03 20:10:58 -04:00
|
|
|
(bracketed_parameter_list
|
|
|
|
|
name: (identifier) @variable.parameter)
|
|
|
|
|
|
|
|
|
|
(implicit_parameter) @variable.parameter
|
2024-01-24 01:11:16 -05:00
|
|
|
|
2020-07-19 14:31:07 -07:00
|
|
|
(parameter_list
|
|
|
|
|
(parameter
|
2024-01-06 15:05:50 +09:00
|
|
|
type: (identifier) @type))
|
2020-07-19 14:31:07 -07:00
|
|
|
|
2020-07-19 14:01:13 -07: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
|
|
|
(real_literal) @number.float
|
2020-07-18 16:21:20 -07:00
|
|
|
|
|
|
|
|
(null_literal) @constant.builtin
|
2024-01-06 15:05:50 +09:00
|
|
|
|
2024-05-03 20:10:58 -04:00
|
|
|
(calling_convention
|
|
|
|
|
[
|
|
|
|
|
(identifier)
|
|
|
|
|
"Cdecl"
|
|
|
|
|
"Stdcall"
|
|
|
|
|
"Thiscall"
|
|
|
|
|
"Fastcall"
|
|
|
|
|
] @attribute.builtin)
|
|
|
|
|
|
2020-07-18 16:21:20 -07:00
|
|
|
(character_literal) @character
|
|
|
|
|
|
|
|
|
|
[
|
2024-01-06 15:05:50 +09:00
|
|
|
(string_literal)
|
2024-04-09 00:54:47 +03:00
|
|
|
(raw_string_literal)
|
2024-01-06 15:05:50 +09:00
|
|
|
(verbatim_string_literal)
|
|
|
|
|
(interpolated_string_expression)
|
2020-07-18 16:21:20 -07:00
|
|
|
] @string
|
|
|
|
|
|
2024-03-03 02:24:46 -08:00
|
|
|
(escape_sequence) @string.escape
|
|
|
|
|
|
2024-05-03 20:10:58 -04:00
|
|
|
[
|
|
|
|
|
"true"
|
|
|
|
|
"false"
|
|
|
|
|
] @boolean
|
2020-07-18 16:21:20 -07:00
|
|
|
|
2024-01-06 15:05:50 +09:00
|
|
|
(predefined_type) @type.builtin
|
2020-07-18 16:21:20 -07:00
|
|
|
|
2021-06-02 18:16:12 -04:00
|
|
|
(implicit_type) @keyword
|
|
|
|
|
|
2022-09-26 10:19:02 +01:00
|
|
|
(comment) @comment @spell
|
2020-07-18 16:21:20 -07:00
|
|
|
|
2023-03-02 08:06:35 -05:00
|
|
|
((comment) @comment.documentation
|
|
|
|
|
(#lua-match? @comment.documentation "^/[*][*][^*].*[*]/$"))
|
|
|
|
|
|
|
|
|
|
((comment) @comment.documentation
|
|
|
|
|
(#lua-match? @comment.documentation "^///[^/]"))
|
2024-01-06 15:05:50 +09:00
|
|
|
|
2023-03-02 08:06:35 -05:00
|
|
|
((comment) @comment.documentation
|
|
|
|
|
(#lua-match? @comment.documentation "^///$"))
|
|
|
|
|
|
2020-07-18 16:21:20 -07:00
|
|
|
(using_directive
|
|
|
|
|
(identifier) @type)
|
|
|
|
|
|
2022-10-22 12:25:51 +03:00
|
|
|
(using_directive
|
2024-05-03 20:10:58 -04:00
|
|
|
(type) @type.definition)
|
2022-10-22 12:25:51 +03:00
|
|
|
|
2020-07-19 12:52:50 -07:00
|
|
|
(property_declaration
|
|
|
|
|
name: (identifier) @property)
|
|
|
|
|
|
2021-06-02 18:16:12 -04:00
|
|
|
(property_declaration
|
|
|
|
|
type: (identifier) @type)
|
|
|
|
|
|
|
|
|
|
(nullable_type
|
2024-05-03 20:10:58 -04:00
|
|
|
type: (identifier) @type)
|
|
|
|
|
|
|
|
|
|
(array_type
|
|
|
|
|
type: (identifier) @type)
|
|
|
|
|
|
|
|
|
|
(ref_type
|
|
|
|
|
type: (identifier) @type)
|
|
|
|
|
|
|
|
|
|
(pointer_type
|
|
|
|
|
type: (identifier) @type)
|
2021-06-02 18:16:12 -04:00
|
|
|
|
2020-07-19 14:31:07 -07:00
|
|
|
(catch_declaration
|
|
|
|
|
type: (identifier) @type)
|
|
|
|
|
|
2020-07-18 16:21:20 -07:00
|
|
|
(interface_declaration
|
|
|
|
|
name: (identifier) @type)
|
2024-01-06 15:05:50 +09:00
|
|
|
|
2020-07-18 16:21:20 -07:00
|
|
|
(class_declaration
|
|
|
|
|
name: (identifier) @type)
|
2024-01-06 15:05:50 +09:00
|
|
|
|
2021-08-17 20:48:29 +03:00
|
|
|
(record_declaration
|
|
|
|
|
name: (identifier) @type)
|
2024-01-06 15:05:50 +09:00
|
|
|
|
2024-05-03 20:10:58 -04:00
|
|
|
(struct_declaration
|
|
|
|
|
name: (identifier) @type)
|
|
|
|
|
|
2020-07-18 16:21:20 -07:00
|
|
|
(enum_declaration
|
|
|
|
|
name: (identifier) @type)
|
2024-01-06 15:05:50 +09:00
|
|
|
|
2025-09-17 22:48:13 +08:00
|
|
|
(delegate_declaration
|
|
|
|
|
name: (identifier) @type)
|
|
|
|
|
|
2024-02-21 18:17:32 -05:00
|
|
|
(enum_member_declaration
|
|
|
|
|
name: (identifier) @variable.member)
|
|
|
|
|
|
2024-05-03 20:10:58 -04:00
|
|
|
(operator_declaration
|
|
|
|
|
type: (identifier) @type)
|
|
|
|
|
|
|
|
|
|
(conversion_operator_declaration
|
|
|
|
|
type: (identifier) @type)
|
|
|
|
|
|
|
|
|
|
(explicit_interface_specifier
|
|
|
|
|
[
|
|
|
|
|
(identifier) @type
|
|
|
|
|
(generic_name
|
|
|
|
|
(identifier) @type)
|
|
|
|
|
])
|
|
|
|
|
|
|
|
|
|
(explicit_interface_specifier
|
|
|
|
|
(identifier) @type)
|
|
|
|
|
|
|
|
|
|
(primary_constructor_base_type
|
|
|
|
|
type: (identifier) @type)
|
|
|
|
|
|
|
|
|
|
[
|
|
|
|
|
"assembly"
|
|
|
|
|
"module"
|
|
|
|
|
"this"
|
|
|
|
|
"base"
|
|
|
|
|
] @variable.builtin
|
|
|
|
|
|
2020-07-18 16:21:20 -07:00
|
|
|
(constructor_declaration
|
2020-07-19 12:52:50 -07:00
|
|
|
name: (identifier) @constructor)
|
2024-01-06 15:05:50 +09:00
|
|
|
|
2024-05-03 20:10:58 -04:00
|
|
|
(destructor_declaration
|
|
|
|
|
name: (identifier) @constructor)
|
|
|
|
|
|
2024-01-06 15:05:50 +09:00
|
|
|
(constructor_initializer
|
|
|
|
|
"base" @constructor)
|
2020-07-19 12:52:50 -07:00
|
|
|
|
2020-07-18 16:21:20 -07:00
|
|
|
(variable_declaration
|
|
|
|
|
(identifier) @type)
|
2024-01-06 15:05:50 +09:00
|
|
|
|
2020-07-18 16:21:20 -07:00
|
|
|
(object_creation_expression
|
|
|
|
|
(identifier) @type)
|
|
|
|
|
|
2021-08-05 22:02:01 -04:00
|
|
|
; Generic Types.
|
2024-05-03 20:10:58 -04:00
|
|
|
(typeof_expression
|
2021-08-05 22:02:01 -04:00
|
|
|
(generic_name
|
|
|
|
|
(identifier) @type))
|
|
|
|
|
|
|
|
|
|
(type_argument_list
|
|
|
|
|
(generic_name
|
|
|
|
|
(identifier) @type))
|
|
|
|
|
|
|
|
|
|
(base_list
|
|
|
|
|
(generic_name
|
|
|
|
|
(identifier) @type))
|
|
|
|
|
|
2024-05-03 20:10:58 -04:00
|
|
|
(type_parameter_constraint
|
|
|
|
|
[
|
|
|
|
|
(identifier) @type
|
|
|
|
|
(type
|
|
|
|
|
(generic_name
|
|
|
|
|
(identifier) @type))
|
|
|
|
|
])
|
2021-08-05 22:02:01 -04:00
|
|
|
|
|
|
|
|
(object_creation_expression
|
|
|
|
|
(generic_name
|
2024-01-06 15:05:50 +09:00
|
|
|
(identifier) @type))
|
2021-08-05 22:02:01 -04:00
|
|
|
|
|
|
|
|
(property_declaration
|
|
|
|
|
(generic_name
|
|
|
|
|
(identifier) @type))
|
|
|
|
|
|
2021-10-22 23:31:41 +02:00
|
|
|
(_
|
2024-03-21 20:44:35 +09:00
|
|
|
type: (generic_name
|
|
|
|
|
(identifier) @type))
|
2024-01-06 15:05:50 +09:00
|
|
|
|
2021-08-05 22:02:01 -04:00
|
|
|
; Generic Method invocation with generic type
|
|
|
|
|
(invocation_expression
|
2024-03-21 20:44:35 +09:00
|
|
|
function: (generic_name
|
|
|
|
|
.
|
|
|
|
|
(identifier) @function.method.call))
|
2021-08-05 22:02:01 -04:00
|
|
|
|
2021-06-02 18:16:12 -04:00
|
|
|
(invocation_expression
|
|
|
|
|
(member_access_expression
|
|
|
|
|
(generic_name
|
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
|
|
|
(identifier) @function.method)))
|
2021-06-02 18:16:12 -04:00
|
|
|
|
2020-07-19 14:23:24 -07:00
|
|
|
(base_list
|
|
|
|
|
(identifier) @type)
|
2020-07-19 12:52:50 -07:00
|
|
|
|
2020-07-19 14:23:24 -07:00
|
|
|
(type_argument_list
|
2024-01-06 15:05:50 +09:00
|
|
|
(identifier) @type)
|
2020-07-19 12:52:50 -07:00
|
|
|
|
2021-06-02 18:16:12 -04:00
|
|
|
(type_parameter_list
|
|
|
|
|
(type_parameter) @type)
|
|
|
|
|
|
2024-05-03 20:10:58 -04:00
|
|
|
(type_parameter
|
|
|
|
|
name: (identifier) @type)
|
|
|
|
|
|
2021-06-02 18:16:12 -04:00
|
|
|
(type_parameter_constraints_clause
|
2024-05-03 20:10:58 -04:00
|
|
|
"where"
|
|
|
|
|
.
|
|
|
|
|
(identifier) @type)
|
2021-06-02 18:16:12 -04:00
|
|
|
|
2020-07-18 16:21:20 -07:00
|
|
|
(attribute
|
2024-01-06 15:05:50 +09:00
|
|
|
name: (identifier) @attribute)
|
2020-07-18 16:21:20 -07:00
|
|
|
|
2024-05-03 20:10:58 -04:00
|
|
|
(foreach_statement
|
2021-06-02 18:16:12 -04:00
|
|
|
type: (identifier) @type)
|
|
|
|
|
|
2024-05-03 20:10:58 -04:00
|
|
|
(goto_statement
|
|
|
|
|
(identifier) @label)
|
|
|
|
|
|
|
|
|
|
(labeled_statement
|
|
|
|
|
(identifier) @label)
|
|
|
|
|
|
2021-08-05 22:02:01 -04:00
|
|
|
(tuple_element
|
|
|
|
|
type: (identifier) @type)
|
|
|
|
|
|
|
|
|
|
(tuple_expression
|
|
|
|
|
(argument
|
|
|
|
|
(declaration_expression
|
|
|
|
|
type: (identifier) @type)))
|
|
|
|
|
|
2024-05-03 20:10:58 -04:00
|
|
|
(cast_expression
|
|
|
|
|
type: (identifier) @type)
|
|
|
|
|
|
|
|
|
|
(lambda_expression
|
|
|
|
|
type: (identifier) @type)
|
|
|
|
|
|
2026-02-24 18:25:39 -08:00
|
|
|
(lambda_expression
|
|
|
|
|
(modifier) @keyword.modifier)
|
|
|
|
|
|
2021-08-05 22:02:01 -04:00
|
|
|
(as_expression
|
|
|
|
|
right: (identifier) @type)
|
|
|
|
|
|
2024-05-03 20:10:58 -04:00
|
|
|
(typeof_expression
|
2021-08-05 22:02:01 -04:00
|
|
|
(identifier) @type)
|
|
|
|
|
|
2024-05-03 20:10:58 -04:00
|
|
|
(preproc_error) @keyword.exception
|
2021-08-05 22:02:01 -04:00
|
|
|
|
2024-05-03 20:10:58 -04:00
|
|
|
[
|
|
|
|
|
"#define"
|
|
|
|
|
"#undef"
|
|
|
|
|
] @keyword.directive.define
|
2024-01-06 15:05:50 +09:00
|
|
|
|
2024-05-03 20:10:58 -04:00
|
|
|
[
|
|
|
|
|
"#if"
|
|
|
|
|
"#elif"
|
|
|
|
|
"#else"
|
|
|
|
|
"#endif"
|
|
|
|
|
"#region"
|
|
|
|
|
"#endregion"
|
|
|
|
|
"#line"
|
|
|
|
|
"#pragma"
|
|
|
|
|
"#nullable"
|
|
|
|
|
"#error"
|
|
|
|
|
(shebang_directive)
|
|
|
|
|
] @keyword.directive
|
2021-06-03 20:54:10 -04:00
|
|
|
|
|
|
|
|
[
|
2024-05-03 20:10:58 -04:00
|
|
|
(preproc_line)
|
|
|
|
|
(preproc_pragma)
|
|
|
|
|
(preproc_nullable)
|
2021-06-03 20:54:10 -04:00
|
|
|
] @constant.macro
|
|
|
|
|
|
2024-05-03 20:10:58 -04:00
|
|
|
(preproc_pragma
|
|
|
|
|
(identifier) @constant)
|
|
|
|
|
|
2024-08-30 01:26:22 -07:00
|
|
|
(preproc_if
|
|
|
|
|
(identifier) @constant)
|
|
|
|
|
|
2020-07-18 16:21:20 -07:00
|
|
|
[
|
2024-01-06 15:05:50 +09:00
|
|
|
"if"
|
|
|
|
|
"else"
|
|
|
|
|
"switch"
|
|
|
|
|
"break"
|
|
|
|
|
"case"
|
|
|
|
|
"when"
|
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
|
2020-07-18 16:21:20 -07:00
|
|
|
|
|
|
|
|
[
|
2024-01-06 15:05:50 +09:00
|
|
|
"while"
|
|
|
|
|
"for"
|
|
|
|
|
"do"
|
|
|
|
|
"continue"
|
|
|
|
|
"goto"
|
|
|
|
|
"foreach"
|
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
|
2020-07-18 16:21:20 -07:00
|
|
|
|
|
|
|
|
[
|
2024-01-06 15:05:50 +09:00
|
|
|
"try"
|
|
|
|
|
"catch"
|
|
|
|
|
"throw"
|
|
|
|
|
"finally"
|
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
|
2020-07-18 16:21:20 -07:00
|
|
|
|
2020-07-19 12:52:50 -07:00
|
|
|
[
|
2024-01-06 15:05:50 +09:00
|
|
|
"+"
|
|
|
|
|
"?"
|
|
|
|
|
":"
|
|
|
|
|
"++"
|
|
|
|
|
"-"
|
|
|
|
|
"--"
|
|
|
|
|
"&"
|
|
|
|
|
"&&"
|
|
|
|
|
"|"
|
|
|
|
|
"||"
|
|
|
|
|
"!"
|
|
|
|
|
"!="
|
|
|
|
|
"=="
|
|
|
|
|
"*"
|
|
|
|
|
"/"
|
|
|
|
|
"%"
|
|
|
|
|
"<"
|
|
|
|
|
"<="
|
|
|
|
|
">"
|
|
|
|
|
">="
|
|
|
|
|
"="
|
|
|
|
|
"-="
|
|
|
|
|
"+="
|
|
|
|
|
"*="
|
|
|
|
|
"/="
|
|
|
|
|
"%="
|
|
|
|
|
"^"
|
|
|
|
|
"^="
|
|
|
|
|
"&="
|
|
|
|
|
"|="
|
|
|
|
|
"~"
|
|
|
|
|
">>"
|
|
|
|
|
">>>"
|
|
|
|
|
"<<"
|
|
|
|
|
"<<="
|
|
|
|
|
">>="
|
|
|
|
|
">>>="
|
|
|
|
|
"=>"
|
|
|
|
|
"??"
|
|
|
|
|
"??="
|
2024-05-03 20:10:58 -04:00
|
|
|
".."
|
2020-07-19 12:52:50 -07:00
|
|
|
] @operator
|
|
|
|
|
|
2024-09-19 23:15:01 -07:00
|
|
|
(list_pattern
|
|
|
|
|
".." @character.special)
|
|
|
|
|
|
|
|
|
|
(discard) @character.special
|
|
|
|
|
|
2020-07-18 16:21:20 -07:00
|
|
|
[
|
2024-01-06 15:05:50 +09:00
|
|
|
";"
|
|
|
|
|
"."
|
|
|
|
|
","
|
|
|
|
|
":"
|
2025-07-14 17:48:23 -07:00
|
|
|
"::"
|
2020-07-18 16:21:20 -07:00
|
|
|
] @punctuation.delimiter
|
|
|
|
|
|
2024-01-06 15:05:50 +09:00
|
|
|
(conditional_expression
|
|
|
|
|
[
|
|
|
|
|
"?"
|
|
|
|
|
":"
|
|
|
|
|
] @keyword.conditional.ternary)
|
2023-05-04 19:37:29 +00:00
|
|
|
|
2020-07-18 16:21:20 -07:00
|
|
|
[
|
2024-01-06 15:05:50 +09:00
|
|
|
"["
|
|
|
|
|
"]"
|
|
|
|
|
"{"
|
|
|
|
|
"}"
|
|
|
|
|
"("
|
|
|
|
|
")"
|
2020-07-18 16:21:20 -07:00
|
|
|
] @punctuation.bracket
|
|
|
|
|
|
2024-05-03 20:10:58 -04:00
|
|
|
(interpolation_brace) @punctuation.special
|
|
|
|
|
|
2025-07-14 17:55:29 -07:00
|
|
|
(type_parameter_list
|
|
|
|
|
[
|
|
|
|
|
"<"
|
|
|
|
|
">"
|
|
|
|
|
] @punctuation.bracket)
|
|
|
|
|
|
2024-01-06 15:05:50 +09:00
|
|
|
(type_argument_list
|
|
|
|
|
[
|
|
|
|
|
"<"
|
|
|
|
|
">"
|
|
|
|
|
] @punctuation.bracket)
|
2023-05-04 19:46:41 +00:00
|
|
|
|
2020-07-18 16:21:20 -07:00
|
|
|
[
|
2024-01-06 15:05:50 +09:00
|
|
|
"using"
|
|
|
|
|
"as"
|
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.import
|
2020-07-19 12:52:50 -07:00
|
|
|
|
2021-08-17 20:48:29 +03:00
|
|
|
(alias_qualified_name
|
2024-01-06 15:05:50 +09:00
|
|
|
(identifier
|
|
|
|
|
"global") @keyword.import)
|
2021-08-17 20:48:29 +03:00
|
|
|
|
2020-07-19 12:52:50 -07:00
|
|
|
[
|
2024-01-06 15:05:50 +09:00
|
|
|
"with"
|
|
|
|
|
"new"
|
|
|
|
|
"typeof"
|
|
|
|
|
"sizeof"
|
|
|
|
|
"is"
|
|
|
|
|
"and"
|
|
|
|
|
"or"
|
|
|
|
|
"not"
|
|
|
|
|
"stackalloc"
|
2024-05-03 20:10:58 -04:00
|
|
|
"__makeref"
|
|
|
|
|
"__reftype"
|
|
|
|
|
"__refvalue"
|
2024-01-06 15:05:50 +09:00
|
|
|
"in"
|
|
|
|
|
"out"
|
|
|
|
|
"ref"
|
2021-04-22 18:02:24 +02:00
|
|
|
] @keyword.operator
|
|
|
|
|
|
|
|
|
|
[
|
2024-01-06 15:05:50 +09:00
|
|
|
"lock"
|
|
|
|
|
"params"
|
|
|
|
|
"operator"
|
|
|
|
|
"default"
|
|
|
|
|
"implicit"
|
|
|
|
|
"explicit"
|
|
|
|
|
"override"
|
|
|
|
|
"get"
|
|
|
|
|
"set"
|
|
|
|
|
"init"
|
|
|
|
|
"where"
|
|
|
|
|
"add"
|
|
|
|
|
"remove"
|
|
|
|
|
"checked"
|
|
|
|
|
"unchecked"
|
|
|
|
|
"fixed"
|
|
|
|
|
"alias"
|
2024-05-03 20:10:58 -04:00
|
|
|
"file"
|
|
|
|
|
"unsafe"
|
2020-07-18 16:21:20 -07:00
|
|
|
] @keyword
|
|
|
|
|
|
2024-05-03 20:10:58 -04:00
|
|
|
(attribute_target_specifier
|
|
|
|
|
.
|
|
|
|
|
_ @keyword)
|
|
|
|
|
|
2024-04-23 12:23:15 -07:00
|
|
|
[
|
|
|
|
|
"enum"
|
|
|
|
|
"record"
|
|
|
|
|
"class"
|
|
|
|
|
"struct"
|
|
|
|
|
"interface"
|
|
|
|
|
"namespace"
|
|
|
|
|
"event"
|
|
|
|
|
"delegate"
|
|
|
|
|
] @keyword.type
|
|
|
|
|
|
2023-02-24 06:37:45 -05:00
|
|
|
[
|
|
|
|
|
"async"
|
|
|
|
|
"await"
|
|
|
|
|
] @keyword.coroutine
|
|
|
|
|
|
2022-10-22 12:25:51 +03:00
|
|
|
[
|
2024-01-06 15:05:50 +09:00
|
|
|
"const"
|
|
|
|
|
"extern"
|
|
|
|
|
"readonly"
|
|
|
|
|
"static"
|
|
|
|
|
"volatile"
|
|
|
|
|
"required"
|
2024-05-03 20:10:58 -04:00
|
|
|
"managed"
|
|
|
|
|
"unmanaged"
|
|
|
|
|
"notnull"
|
2024-01-06 15:05:50 +09:00
|
|
|
"abstract"
|
|
|
|
|
"private"
|
|
|
|
|
"protected"
|
|
|
|
|
"internal"
|
|
|
|
|
"public"
|
|
|
|
|
"partial"
|
|
|
|
|
"sealed"
|
|
|
|
|
"virtual"
|
2024-05-03 20:10:58 -04:00
|
|
|
"global"
|
2024-03-08 19:09:51 +09:00
|
|
|
] @keyword.modifier
|
2022-10-22 12:25:51 +03:00
|
|
|
|
2024-05-03 20:10:58 -04:00
|
|
|
(scoped_type
|
|
|
|
|
"scoped" @keyword.modifier)
|
2021-08-05 22:02:01 -04:00
|
|
|
|
|
|
|
|
(query_expression
|
2024-01-06 15:05:50 +09:00
|
|
|
(_
|
|
|
|
|
[
|
|
|
|
|
"from"
|
|
|
|
|
"orderby"
|
|
|
|
|
"select"
|
|
|
|
|
"group"
|
|
|
|
|
"by"
|
|
|
|
|
"ascending"
|
|
|
|
|
"descending"
|
|
|
|
|
"equals"
|
|
|
|
|
"let"
|
|
|
|
|
] @keyword))
|
2021-08-05 22:02:01 -04:00
|
|
|
|
2021-07-04 19:55:59 +03:00
|
|
|
[
|
|
|
|
|
"return"
|
|
|
|
|
"yield"
|
2021-07-04 20:24:25 +03:00
|
|
|
] @keyword.return
|