2024-01-06 15:05:50 +09:00
|
|
|
; General syntax
|
2022-05-21 12:47:48 +02:00
|
|
|
(command_name) @function
|
2024-01-06 15:05:50 +09:00
|
|
|
|
|
|
|
|
(text_mode
|
|
|
|
|
"\\text" @function)
|
|
|
|
|
|
2022-02-16 17:29:56 +01:00
|
|
|
(caption
|
|
|
|
|
command: _ @function)
|
2021-03-28 01:42:47 +01:00
|
|
|
|
2022-02-05 16:09:35 +01:00
|
|
|
(key_value_pair
|
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
|
|
|
key: (_) @variable.parameter
|
2022-02-05 16:09:35 +01:00
|
|
|
value: (_))
|
2021-05-15 11:46:04 +02:00
|
|
|
|
2022-02-05 16:09:35 +01:00
|
|
|
[
|
2024-01-06 15:05:50 +09:00
|
|
|
(brack_group)
|
|
|
|
|
(brack_group_argc)
|
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
|
|
|
] @variable.parameter
|
2021-03-26 14:57:11 +01:00
|
|
|
|
2024-01-06 15:05:50 +09:00
|
|
|
[
|
|
|
|
|
(operator)
|
|
|
|
|
"="
|
2024-01-21 20:53:24 -08:00
|
|
|
"_"
|
|
|
|
|
"^"
|
2024-01-06 15:05:50 +09:00
|
|
|
] @operator
|
2021-03-26 14:57:11 +01:00
|
|
|
|
2022-02-04 11:29:46 +01:00
|
|
|
"\\item" @punctuation.special
|
|
|
|
|
|
|
|
|
|
((word) @punctuation.delimiter
|
2024-01-06 15:05:50 +09:00
|
|
|
(#eq? @punctuation.delimiter "&"))
|
2022-02-04 11:29:46 +01:00
|
|
|
|
2024-01-06 15:05:50 +09:00
|
|
|
[
|
|
|
|
|
"["
|
|
|
|
|
"]"
|
|
|
|
|
"{"
|
|
|
|
|
"}"
|
|
|
|
|
] @punctuation.bracket ; "(" ")" has no syntactical meaning in LaTeX
|
2022-02-05 16:09:35 +01:00
|
|
|
|
2024-01-06 15:05:50 +09:00
|
|
|
; General environments
|
2022-02-05 16:09:35 +01:00
|
|
|
(begin
|
2024-01-06 15:05:50 +09:00
|
|
|
command: _ @markup.environment
|
|
|
|
|
name:
|
|
|
|
|
(curly_group_text
|
|
|
|
|
(text) @markup.environment.name))
|
2022-02-05 16:09:35 +01:00
|
|
|
|
|
|
|
|
(end
|
2024-01-06 15:05:50 +09:00
|
|
|
command: _ @markup.environment
|
|
|
|
|
name:
|
|
|
|
|
(curly_group_text
|
|
|
|
|
(text) @markup.environment.name))
|
2022-02-05 16:09:35 +01:00
|
|
|
|
2024-01-06 15:05:50 +09:00
|
|
|
; Definitions and references
|
2022-02-05 16:09:35 +01:00
|
|
|
(new_command_definition
|
2024-01-06 15:05:50 +09:00
|
|
|
command: _ @function.macro
|
|
|
|
|
declaration:
|
|
|
|
|
(curly_group_command_name
|
|
|
|
|
(_) @function))
|
|
|
|
|
|
2022-02-05 16:09:35 +01:00
|
|
|
(old_command_definition
|
2024-01-06 15:05:50 +09:00
|
|
|
command: _ @function.macro
|
|
|
|
|
declaration: (_) @function)
|
|
|
|
|
|
2022-02-05 16:09:35 +01:00
|
|
|
(let_command_definition
|
2024-01-06 15:05:50 +09:00
|
|
|
command: _ @function.macro
|
|
|
|
|
declaration: (_) @function)
|
2022-02-05 16:09:35 +01:00
|
|
|
|
2022-04-14 11:06:08 +02:00
|
|
|
(environment_definition
|
2024-01-06 15:05:50 +09:00
|
|
|
command: _ @function.macro
|
|
|
|
|
name:
|
|
|
|
|
(curly_group_text
|
|
|
|
|
(_) @markup.link))
|
2022-04-14 11:06:08 +02:00
|
|
|
|
2022-02-05 16:09:35 +01:00
|
|
|
(theorem_definition
|
2024-01-06 15:05:50 +09:00
|
|
|
command: _ @function.macro
|
|
|
|
|
name:
|
|
|
|
|
(curly_group_text
|
|
|
|
|
(_) @markup.environment.name))
|
2022-02-04 11:29:46 +01:00
|
|
|
|
2022-04-14 11:06:08 +02:00
|
|
|
(paired_delimiter_definition
|
2024-01-06 15:05:50 +09:00
|
|
|
command: _ @function.macro
|
|
|
|
|
declaration:
|
|
|
|
|
(curly_group_command_name
|
|
|
|
|
(_) @function))
|
2022-04-14 11:06:08 +02:00
|
|
|
|
2022-02-04 11:29:46 +01:00
|
|
|
(label_definition
|
2024-01-06 15:05:50 +09:00
|
|
|
command: _ @function.macro
|
|
|
|
|
name:
|
|
|
|
|
(curly_group_text
|
|
|
|
|
(_) @markup.link))
|
|
|
|
|
|
2022-02-04 11:29:46 +01:00
|
|
|
(label_reference_range
|
2024-01-06 15:05:50 +09:00
|
|
|
command: _ @function.macro
|
|
|
|
|
from:
|
|
|
|
|
(curly_group_text
|
|
|
|
|
(_) @markup.link)
|
|
|
|
|
to:
|
|
|
|
|
(curly_group_text
|
|
|
|
|
(_) @markup.link))
|
|
|
|
|
|
2022-02-04 11:29:46 +01:00
|
|
|
(label_reference
|
2024-01-06 15:05:50 +09:00
|
|
|
command: _ @function.macro
|
|
|
|
|
names:
|
|
|
|
|
(curly_group_text_list
|
|
|
|
|
(_) @markup.link))
|
|
|
|
|
|
2022-02-04 11:29:46 +01:00
|
|
|
(label_number
|
2024-01-06 15:05:50 +09:00
|
|
|
command: _ @function.macro
|
|
|
|
|
name:
|
|
|
|
|
(curly_group_text
|
|
|
|
|
(_) @markup.link)
|
|
|
|
|
number: (_) @markup.link)
|
2022-02-04 11:29:46 +01:00
|
|
|
|
|
|
|
|
(citation
|
2024-01-06 15:05:50 +09:00
|
|
|
command: _ @function.macro
|
|
|
|
|
keys: (curly_group_text_list) @markup.link)
|
2022-02-04 11:29:46 +01:00
|
|
|
|
2022-02-05 16:09:35 +01:00
|
|
|
(glossary_entry_definition
|
2024-01-06 15:05:50 +09:00
|
|
|
command: _ @function.macro
|
|
|
|
|
name:
|
|
|
|
|
(curly_group_text
|
|
|
|
|
(_) @markup.link))
|
|
|
|
|
|
2022-02-05 16:09:35 +01:00
|
|
|
(glossary_entry_reference
|
2024-01-06 15:05:50 +09:00
|
|
|
command: _ @function.macro
|
|
|
|
|
name:
|
|
|
|
|
(curly_group_text
|
|
|
|
|
(_) @markup.link))
|
2022-02-05 16:09:35 +01:00
|
|
|
|
|
|
|
|
(acronym_definition
|
2024-01-06 15:05:50 +09:00
|
|
|
command: _ @function.macro
|
|
|
|
|
name:
|
|
|
|
|
(curly_group_text
|
|
|
|
|
(_) @markup.link))
|
|
|
|
|
|
2022-02-05 16:09:35 +01:00
|
|
|
(acronym_reference
|
2024-01-06 15:05:50 +09:00
|
|
|
command: _ @function.macro
|
|
|
|
|
name:
|
|
|
|
|
(curly_group_text
|
|
|
|
|
(_) @markup.link))
|
2022-02-05 16:09:35 +01:00
|
|
|
|
|
|
|
|
(color_definition
|
2024-01-06 15:05:50 +09:00
|
|
|
command: _ @function.macro
|
|
|
|
|
name:
|
|
|
|
|
(curly_group_text
|
|
|
|
|
(_) @markup.link))
|
|
|
|
|
|
2022-02-05 16:09:35 +01:00
|
|
|
(color_reference
|
2024-01-06 15:05:50 +09:00
|
|
|
command: _ @function.macro
|
|
|
|
|
name:
|
|
|
|
|
(curly_group_text
|
|
|
|
|
(_) @markup.link))
|
2021-03-26 14:57:11 +01:00
|
|
|
|
2024-01-21 20:52:06 -08:00
|
|
|
; Formatting
|
|
|
|
|
(text_mode
|
|
|
|
|
content:
|
|
|
|
|
(curly_group
|
|
|
|
|
(_) @none @spell))
|
|
|
|
|
|
2022-04-14 11:06:08 +02:00
|
|
|
(math_environment
|
2022-02-05 16:09:35 +01:00
|
|
|
(begin
|
2024-01-06 15:05:50 +09:00
|
|
|
command: _ @markup.math
|
|
|
|
|
name:
|
|
|
|
|
(curly_group_text
|
2024-01-21 20:52:06 -08:00
|
|
|
(_) @markup.math)))
|
2022-04-14 11:06:08 +02:00
|
|
|
|
2022-04-15 10:11:23 +02:00
|
|
|
(math_environment
|
2024-01-21 20:52:06 -08:00
|
|
|
(_) @markup.math)
|
2022-04-15 10:11:23 +02:00
|
|
|
|
2022-04-14 11:06:08 +02:00
|
|
|
(math_environment
|
2022-02-05 16:09:35 +01:00
|
|
|
(end
|
2024-01-06 15:05:50 +09:00
|
|
|
command: _ @markup.math
|
|
|
|
|
name:
|
|
|
|
|
(curly_group_text
|
2024-01-21 20:52:06 -08:00
|
|
|
(_) @markup.math)))
|
2021-03-26 14:57:11 +01:00
|
|
|
|
2024-01-06 15:05:50 +09:00
|
|
|
; Sectioning
|
2022-04-14 11:06:08 +02:00
|
|
|
(title_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
|
|
|
command: _ @module
|
2024-01-06 15:05:50 +09:00
|
|
|
options:
|
|
|
|
|
(brack_group
|
|
|
|
|
(_) @markup.heading.1)?
|
|
|
|
|
text:
|
|
|
|
|
(curly_group
|
|
|
|
|
(_) @markup.heading.1))
|
2022-04-14 11:06:08 +02:00
|
|
|
|
|
|
|
|
(author_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
|
|
|
command: _ @module
|
2024-01-06 15:05:50 +09:00
|
|
|
authors:
|
|
|
|
|
(curly_group_author_list
|
2024-01-21 22:05:44 +09:00
|
|
|
(author)+ @markup.heading.1))
|
2022-04-14 11:06:08 +02:00
|
|
|
|
2021-03-26 14:57:11 +01:00
|
|
|
(chapter
|
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
|
|
|
command: _ @module
|
2024-01-06 15:05:50 +09:00
|
|
|
toc:
|
|
|
|
|
(brack_group
|
|
|
|
|
(_) @markup.heading.2)?
|
|
|
|
|
text:
|
|
|
|
|
(curly_group
|
|
|
|
|
(_) @markup.heading.2))
|
2021-03-26 14:57:11 +01:00
|
|
|
|
2021-03-28 21:06:53 +02:00
|
|
|
(part
|
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
|
|
|
command: _ @module
|
2024-01-06 15:05:50 +09:00
|
|
|
toc:
|
|
|
|
|
(brack_group
|
|
|
|
|
(_) @markup.heading.2)?
|
|
|
|
|
text:
|
|
|
|
|
(curly_group
|
|
|
|
|
(_) @markup.heading.2))
|
2021-03-28 21:06:53 +02:00
|
|
|
|
2021-03-26 14:57:11 +01:00
|
|
|
(section
|
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
|
|
|
command: _ @module
|
2024-01-06 15:05:50 +09:00
|
|
|
toc:
|
|
|
|
|
(brack_group
|
|
|
|
|
(_) @markup.heading.3)?
|
|
|
|
|
text:
|
|
|
|
|
(curly_group
|
|
|
|
|
(_) @markup.heading.3))
|
2021-03-26 14:57:11 +01:00
|
|
|
|
|
|
|
|
(subsection
|
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
|
|
|
command: _ @module
|
2024-01-06 15:05:50 +09:00
|
|
|
toc:
|
|
|
|
|
(brack_group
|
|
|
|
|
(_) @markup.heading.4)?
|
|
|
|
|
text:
|
|
|
|
|
(curly_group
|
|
|
|
|
(_) @markup.heading.4))
|
2021-03-26 14:57:11 +01:00
|
|
|
|
|
|
|
|
(subsubsection
|
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
|
|
|
command: _ @module
|
2024-01-06 15:05:50 +09:00
|
|
|
toc:
|
|
|
|
|
(brack_group
|
|
|
|
|
(_) @markup.heading.5)?
|
|
|
|
|
text:
|
|
|
|
|
(curly_group
|
|
|
|
|
(_) @markup.heading.5))
|
2021-03-26 14:57:11 +01:00
|
|
|
|
|
|
|
|
(paragraph
|
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
|
|
|
command: _ @module
|
2024-01-06 15:05:50 +09:00
|
|
|
toc:
|
|
|
|
|
(brack_group
|
|
|
|
|
(_) @markup.heading.6)?
|
|
|
|
|
text:
|
|
|
|
|
(curly_group
|
|
|
|
|
(_) @markup.heading.6))
|
2021-03-26 14:57:11 +01:00
|
|
|
|
|
|
|
|
(subparagraph
|
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
|
|
|
command: _ @module
|
2024-01-06 15:05:50 +09:00
|
|
|
toc:
|
|
|
|
|
(brack_group
|
|
|
|
|
(_) @markup.heading.6)?
|
|
|
|
|
text:
|
|
|
|
|
(curly_group
|
|
|
|
|
(_) @markup.heading.6))
|
|
|
|
|
|
|
|
|
|
; Beamer frames
|
2022-02-04 11:29:46 +01:00
|
|
|
(generic_environment
|
2021-03-26 14:57:11 +01:00
|
|
|
(begin
|
2024-01-06 15:05:50 +09:00
|
|
|
name:
|
|
|
|
|
(curly_group_text
|
|
|
|
|
(text) @markup.environment.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
|
|
|
(#any-of? @markup.environment.name "frame"))
|
2022-02-04 11:29:46 +01:00
|
|
|
.
|
2024-01-06 15:05:50 +09:00
|
|
|
(curly_group
|
|
|
|
|
(_) @markup.heading))
|
2022-02-04 11:29:46 +01:00
|
|
|
|
2022-02-27 11:29:11 +01:00
|
|
|
((generic_command
|
2022-02-04 11:29:46 +01:00
|
|
|
command: (command_name) @_name
|
2024-01-06 15:05:50 +09:00
|
|
|
arg:
|
|
|
|
|
(curly_group
|
|
|
|
|
(text) @markup.heading))
|
|
|
|
|
(#eq? @_name "\\frametitle"))
|
2021-03-26 14:57:11 +01:00
|
|
|
|
2022-02-27 11:29:11 +01:00
|
|
|
((generic_command
|
2022-02-04 11:29:46 +01:00
|
|
|
command: (command_name) @_name
|
2024-01-06 15:05:50 +09:00
|
|
|
arg:
|
|
|
|
|
(curly_group
|
|
|
|
|
(_) @markup.italic))
|
2022-02-04 11:29:46 +01:00
|
|
|
(#eq? @_name "\\emph"))
|
|
|
|
|
|
2022-02-27 11:29:11 +01:00
|
|
|
((generic_command
|
2022-02-04 11:29:46 +01:00
|
|
|
command: (command_name) @_name
|
2024-01-06 15:05:50 +09:00
|
|
|
arg:
|
|
|
|
|
(curly_group
|
|
|
|
|
(_) @markup.italic))
|
|
|
|
|
(#any-of? @_name "\\textit" "\\mathit"))
|
2022-02-04 11:29:46 +01:00
|
|
|
|
2022-02-27 11:29:11 +01:00
|
|
|
((generic_command
|
2022-02-04 11:29:46 +01:00
|
|
|
command: (command_name) @_name
|
2024-01-06 15:05:50 +09:00
|
|
|
arg:
|
|
|
|
|
(curly_group
|
|
|
|
|
(_) @markup.strong))
|
|
|
|
|
(#any-of? @_name "\\textbf" "\\mathbf"))
|
2022-02-04 11:29:46 +01:00
|
|
|
|
2022-02-27 11:29:11 +01:00
|
|
|
((generic_command
|
2022-02-04 11:29:46 +01:00
|
|
|
command: (command_name) @_name
|
2021-03-28 01:42:47 +01:00
|
|
|
.
|
2024-01-06 15:05:50 +09:00
|
|
|
arg:
|
|
|
|
|
(curly_group
|
|
|
|
|
(_) @markup.link.url))
|
|
|
|
|
(#any-of? @_name "\\url" "\\href"))
|
2021-03-26 14:57:11 +01:00
|
|
|
|
2024-01-06 15:05:50 +09:00
|
|
|
; File inclusion commands
|
2022-02-05 16:09:35 +01:00
|
|
|
(class_include
|
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
|
|
|
command: _ @keyword.import
|
2022-02-05 16:09:35 +01:00
|
|
|
path: (curly_group_path) @string)
|
|
|
|
|
|
|
|
|
|
(package_include
|
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
|
|
|
command: _ @keyword.import
|
2022-02-05 16:09:35 +01:00
|
|
|
paths: (curly_group_path_list) @string)
|
|
|
|
|
|
|
|
|
|
(latex_include
|
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
|
|
|
command: _ @keyword.import
|
2022-02-05 16:09:35 +01:00
|
|
|
path: (curly_group_path) @string)
|
2024-01-06 15:05:50 +09:00
|
|
|
|
2022-02-05 16:09:35 +01:00
|
|
|
(import_include
|
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
|
|
|
command: _ @keyword.import
|
2022-02-05 16:09:35 +01:00
|
|
|
directory: (curly_group_path) @string
|
|
|
|
|
file: (curly_group_path) @string)
|
|
|
|
|
|
|
|
|
|
(bibtex_include
|
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
|
|
|
command: _ @keyword.import
|
2022-02-05 16:09:35 +01:00
|
|
|
path: (curly_group_path) @string)
|
2024-01-06 15:05:50 +09:00
|
|
|
|
2022-02-05 16:09:35 +01:00
|
|
|
(biblatex_include
|
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
|
|
|
"\\addbibresource" @keyword.import
|
|
|
|
|
glob: (curly_group_glob_pattern) @string.regexp)
|
2022-02-05 16:09:35 +01:00
|
|
|
|
|
|
|
|
(graphics_include
|
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
|
|
|
command: _ @keyword.import
|
2022-02-05 16:09:35 +01:00
|
|
|
path: (curly_group_path) @string)
|
2024-01-06 15:05:50 +09:00
|
|
|
|
2022-02-05 16:09:35 +01:00
|
|
|
(tikz_library_import
|
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
|
|
|
command: _ @keyword.import
|
2022-02-19 11:22:25 +01:00
|
|
|
paths: (curly_group_path_list) @string)
|
2022-02-04 11:29:46 +01:00
|
|
|
|
2022-12-08 11:01:56 +01:00
|
|
|
(text) @spell
|
2024-01-06 15:05:50 +09:00
|
|
|
|
2022-12-08 11:01:56 +01:00
|
|
|
(inline_formula) @nospell
|
2024-01-06 15:05:50 +09:00
|
|
|
|
2022-12-08 11:01:56 +01:00
|
|
|
(displayed_equation) @nospell
|
2024-01-06 15:05:50 +09:00
|
|
|
|
2022-12-08 11:01:56 +01:00
|
|
|
(key_value_pair) @nospell
|
2024-01-06 15:05:50 +09:00
|
|
|
|
2022-12-08 11:01:56 +01:00
|
|
|
(generic_environment
|
|
|
|
|
begin: _ @nospell
|
|
|
|
|
end: _ @nospell)
|
2024-01-06 15:05:50 +09:00
|
|
|
|
2022-12-08 11:01:56 +01:00
|
|
|
(citation
|
|
|
|
|
keys: _ @nospell)
|
2024-01-06 15:05:50 +09:00
|
|
|
|
2022-12-08 11:01:56 +01:00
|
|
|
(command_name) @nospell
|
2024-01-06 15:05:50 +09:00
|
|
|
|
2023-12-20 16:03:45 -06:00
|
|
|
(label_definition) @nospell
|
2024-01-06 15:05:50 +09:00
|
|
|
|
2023-12-20 16:03:45 -06:00
|
|
|
(label_reference) @nospell
|
2024-01-06 15:05:50 +09:00
|
|
|
|
2023-12-20 16:03:45 -06:00
|
|
|
(label_reference_range) @nospell
|
2024-02-04 09:01:25 -08:00
|
|
|
|
|
|
|
|
; Math
|
|
|
|
|
[
|
|
|
|
|
(displayed_equation)
|
|
|
|
|
(inline_formula)
|
|
|
|
|
] @markup.math
|
2024-02-05 10:10:18 -08:00
|
|
|
|
|
|
|
|
[
|
|
|
|
|
(line_comment)
|
|
|
|
|
(block_comment)
|
|
|
|
|
(comment_environment)
|
|
|
|
|
] @comment @spell
|
|
|
|
|
|
|
|
|
|
((line_comment) @keyword.directive
|
|
|
|
|
(#lua-match? @keyword.directive "^%% !TeX"))
|
|
|
|
|
|
|
|
|
|
((line_comment) @keyword.directive
|
|
|
|
|
(#lua-match? @keyword.directive "^%%&"))
|