2024-01-06 15:05:50 +09:00
|
|
|
; General syntax
|
2024-07-22 23:12:18 +02:00
|
|
|
(command_name) @function @nospell
|
|
|
|
|
|
|
|
|
|
(caption
|
|
|
|
|
command: _ @function)
|
2024-01-06 15:05:50 +09:00
|
|
|
|
2024-07-22 23:12:18 +02:00
|
|
|
; Turn spelling on for text
|
|
|
|
|
(text) @spell
|
2024-01-06 15:05:50 +09:00
|
|
|
|
2024-07-22 23:12:18 +02:00
|
|
|
; \text, \intertext, \shortintertext, ...
|
|
|
|
|
(text_mode
|
|
|
|
|
command: _ @function @nospell
|
|
|
|
|
content: (curly_group
|
|
|
|
|
(_) @none @spell))
|
2021-03-28 01:42:47 +01:00
|
|
|
|
2024-07-23 09:25:54 +02:00
|
|
|
; Variables, parameters
|
|
|
|
|
(placeholder) @variable
|
|
|
|
|
|
2022-02-05 16:09:35 +01:00
|
|
|
(key_value_pair
|
2024-06-18 21:03:28 +02:00
|
|
|
key: (_) @variable.parameter @nospell
|
2022-02-05 16:09:35 +01:00
|
|
|
value: (_))
|
2021-05-15 11:46:04 +02:00
|
|
|
|
2024-07-23 09:25:54 +02:00
|
|
|
(curly_group_spec
|
|
|
|
|
(text) @variable.parameter)
|
|
|
|
|
|
2025-09-05 11:12:12 +02:00
|
|
|
(curly_group_value
|
|
|
|
|
(value_literal) @constant)
|
|
|
|
|
|
2024-07-23 09:25:54 +02:00
|
|
|
(brack_group_argc) @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
|
|
|
|
|
|
2024-07-21 10:53:59 +02:00
|
|
|
(delimiter) @punctuation.delimiter
|
2022-02-04 11:29:46 +01:00
|
|
|
|
2024-07-27 23:18:55 +02:00
|
|
|
(math_delimiter
|
|
|
|
|
left_command: _ @punctuation.delimiter
|
|
|
|
|
left_delimiter: _ @punctuation.delimiter
|
|
|
|
|
right_command: _ @punctuation.delimiter
|
|
|
|
|
right_delimiter: _ @punctuation.delimiter)
|
|
|
|
|
|
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-03-03 11:00:11 +01:00
|
|
|
command: _ @module
|
2024-03-21 20:44:35 +09:00
|
|
|
name: (curly_group_text
|
2024-06-18 21:03:28 +02:00
|
|
|
(text) @label @nospell))
|
2022-02-05 16:09:35 +01:00
|
|
|
|
|
|
|
|
(end
|
2024-03-03 11:00:11 +01:00
|
|
|
command: _ @module
|
2024-03-21 20:44:35 +09:00
|
|
|
name: (curly_group_text
|
2024-06-18 21:03:28 +02:00
|
|
|
(text) @label @nospell))
|
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-06-18 21:03:28 +02:00
|
|
|
command: _ @function.macro @nospell)
|
2024-01-06 15:05:50 +09:00
|
|
|
|
2022-02-05 16:09:35 +01:00
|
|
|
(old_command_definition
|
2024-06-18 21:03:28 +02:00
|
|
|
command: _ @function.macro @nospell)
|
2024-01-06 15:05:50 +09:00
|
|
|
|
2022-02-05 16:09:35 +01:00
|
|
|
(let_command_definition
|
2024-06-18 21:03:28 +02:00
|
|
|
command: _ @function.macro @nospell)
|
2022-02-05 16:09:35 +01:00
|
|
|
|
2022-04-14 11:06:08 +02:00
|
|
|
(environment_definition
|
2024-06-18 21:03:28 +02:00
|
|
|
command: _ @function.macro @nospell
|
2024-03-21 20:44:35 +09:00
|
|
|
name: (curly_group_text
|
2024-07-26 12:14:14 +02:00
|
|
|
(_) @label @nospell))
|
2022-04-14 11:06:08 +02:00
|
|
|
|
2022-02-05 16:09:35 +01:00
|
|
|
(theorem_definition
|
2024-06-18 21:03:28 +02:00
|
|
|
command: _ @function.macro @nospell
|
2024-04-28 11:38:16 +02:00
|
|
|
name: (curly_group_text_list
|
2024-06-18 21:03:28 +02:00
|
|
|
(_) @label @nospell))
|
2022-02-04 11:29:46 +01:00
|
|
|
|
2022-04-14 11:06:08 +02:00
|
|
|
(paired_delimiter_definition
|
2024-06-18 21:03:28 +02:00
|
|
|
command: _ @function.macro @nospell
|
2024-03-21 20:44:35 +09:00
|
|
|
declaration: (curly_group_command_name
|
|
|
|
|
(_) @function))
|
2022-04-14 11:06:08 +02:00
|
|
|
|
2025-09-05 11:12:12 +02:00
|
|
|
(counter_declaration
|
|
|
|
|
command: _ @function.macro @nospell
|
|
|
|
|
counter: (curly_group_word
|
|
|
|
|
(word) @variable)
|
|
|
|
|
supercounter: (brack_group_word
|
|
|
|
|
(word) @variable)?)
|
|
|
|
|
|
|
|
|
|
(counter_within_declaration
|
|
|
|
|
command: _ @function.macro @nospell
|
|
|
|
|
counter: (curly_group_word
|
|
|
|
|
(word) @variable)
|
|
|
|
|
supercounter: (curly_group_word
|
|
|
|
|
(word) @variable))
|
|
|
|
|
|
|
|
|
|
(counter_without_declaration
|
|
|
|
|
command: _ @function.macro @nospell
|
|
|
|
|
counter: (curly_group_word
|
|
|
|
|
(word) @variable)
|
|
|
|
|
supercounter: (curly_group_word
|
|
|
|
|
(word) @variable))
|
|
|
|
|
|
|
|
|
|
(counter_value
|
|
|
|
|
command: _ @function.macro @nospell
|
|
|
|
|
counter: (curly_group_word
|
|
|
|
|
(word) @variable))
|
|
|
|
|
|
|
|
|
|
; The 'value' fields for the two following highlights
|
|
|
|
|
; are handled by counter_value and curly_group_value.
|
|
|
|
|
(counter_definition
|
|
|
|
|
command: _ @function.macro @nospell
|
|
|
|
|
counter: (curly_group_word
|
|
|
|
|
(word) @variable))
|
|
|
|
|
|
|
|
|
|
(counter_addition
|
|
|
|
|
command: _ @function.macro @nospell
|
|
|
|
|
counter: (curly_group_word
|
|
|
|
|
(word) @variable))
|
|
|
|
|
|
|
|
|
|
(counter_increment
|
|
|
|
|
command: _ @function.macro @nospell
|
|
|
|
|
counter: (curly_group_word
|
|
|
|
|
(word) @variable))
|
|
|
|
|
|
|
|
|
|
(counter_typesetting
|
|
|
|
|
command: _ @function.macro @nospell
|
|
|
|
|
counter: (curly_group_word
|
|
|
|
|
(word) @variable))
|
|
|
|
|
|
2022-02-04 11:29:46 +01:00
|
|
|
(label_definition
|
2024-01-06 15:05:50 +09:00
|
|
|
command: _ @function.macro
|
2025-07-05 14:47:35 +02:00
|
|
|
name: (curly_group_label
|
2024-06-18 21:03:28 +02:00
|
|
|
(_) @markup.link @nospell))
|
2024-01-06 15:05:50 +09:00
|
|
|
|
2022-02-04 11:29:46 +01:00
|
|
|
(label_reference_range
|
2024-01-06 15:05:50 +09:00
|
|
|
command: _ @function.macro
|
2025-09-05 10:46:07 +02:00
|
|
|
from: (curly_group_label
|
2024-03-21 20:44:35 +09:00
|
|
|
(_) @markup.link)
|
2025-09-05 10:46:07 +02:00
|
|
|
to: (curly_group_label
|
2024-03-21 20:44:35 +09:00
|
|
|
(_) @markup.link))
|
2024-01-06 15:05:50 +09:00
|
|
|
|
2022-02-04 11:29:46 +01:00
|
|
|
(label_reference
|
2024-01-06 15:05:50 +09:00
|
|
|
command: _ @function.macro
|
2025-07-05 14:47:35 +02:00
|
|
|
names: (curly_group_label_list
|
2024-03-21 20:44:35 +09:00
|
|
|
(_) @markup.link))
|
2024-01-06 15:05:50 +09:00
|
|
|
|
2022-02-04 11:29:46 +01:00
|
|
|
(label_number
|
2024-01-06 15:05:50 +09:00
|
|
|
command: _ @function.macro
|
2025-09-05 10:46:07 +02:00
|
|
|
name: (curly_group_label
|
2024-03-21 20:44:35 +09:00
|
|
|
(_) @markup.link)
|
2024-01-06 15:05:50 +09:00
|
|
|
number: (_) @markup.link)
|
2022-02-04 11:29:46 +01:00
|
|
|
|
|
|
|
|
(citation
|
2024-06-18 21:03:28 +02:00
|
|
|
command: _ @function.macro @nospell
|
|
|
|
|
keys: (curly_group_text_list) @markup.link @nospell)
|
2022-02-04 11:29:46 +01:00
|
|
|
|
2024-09-01 17:15:59 +02:00
|
|
|
((hyperlink
|
2024-07-22 23:12:18 +02:00
|
|
|
command: _ @function @nospell
|
|
|
|
|
uri: (curly_group_uri
|
2024-09-01 17:15:59 +02:00
|
|
|
(_) @markup.link.url @nospell)) @_hyperlink
|
|
|
|
|
(#set! @_hyperlink url @markup.link.url))
|
2024-07-22 23:12:18 +02:00
|
|
|
|
2022-02-05 16:09:35 +01:00
|
|
|
(glossary_entry_definition
|
2024-06-18 21:03:28 +02:00
|
|
|
command: _ @function.macro @nospell
|
2024-03-21 20:44:35 +09:00
|
|
|
name: (curly_group_text
|
2024-06-18 21:03:28 +02:00
|
|
|
(_) @markup.link @nospell))
|
2024-01-06 15:05:50 +09:00
|
|
|
|
2022-02-05 16:09:35 +01:00
|
|
|
(glossary_entry_reference
|
2024-01-06 15:05:50 +09:00
|
|
|
command: _ @function.macro
|
2024-03-21 20:44:35 +09:00
|
|
|
name: (curly_group_text
|
|
|
|
|
(_) @markup.link))
|
2022-02-05 16:09:35 +01:00
|
|
|
|
|
|
|
|
(acronym_definition
|
2024-06-18 21:03:28 +02:00
|
|
|
command: _ @function.macro @nospell
|
2024-03-21 20:44:35 +09:00
|
|
|
name: (curly_group_text
|
2024-06-18 21:03:28 +02:00
|
|
|
(_) @markup.link @nospell))
|
2024-01-06 15:05:50 +09:00
|
|
|
|
2022-02-05 16:09:35 +01:00
|
|
|
(acronym_reference
|
2024-01-06 15:05:50 +09:00
|
|
|
command: _ @function.macro
|
2024-03-21 20:44:35 +09:00
|
|
|
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
|
2024-03-21 20:44:35 +09:00
|
|
|
name: (curly_group_text
|
|
|
|
|
(_) @markup.link))
|
2024-01-06 15:05:50 +09:00
|
|
|
|
2022-02-05 16:09:35 +01:00
|
|
|
(color_reference
|
2024-01-06 15:05:50 +09:00
|
|
|
command: _ @function.macro
|
2024-03-21 20:44:35 +09:00
|
|
|
name: (curly_group_text
|
2024-10-14 15:33:36 +02:00
|
|
|
(_) @markup.link)?)
|
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-03-21 20:44:35 +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-03-21 20:44:35 +09:00
|
|
|
authors: (curly_group_author_list
|
|
|
|
|
(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-03-21 20:44:35 +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-03-21 20:44:35 +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-03-21 20:44:35 +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-03-21 20:44:35 +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-03-21 20:44:35 +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-03-21 20:44:35 +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-03-21 20:44:35 +09:00
|
|
|
toc: (brack_group
|
|
|
|
|
(_) @markup.heading.6)?
|
|
|
|
|
text: (curly_group
|
|
|
|
|
(_) @markup.heading.6))
|
2024-01-06 15:05:50 +09:00
|
|
|
|
|
|
|
|
; Beamer frames
|
2022-02-04 11:29:46 +01:00
|
|
|
(generic_environment
|
2021-03-26 14:57:11 +01:00
|
|
|
(begin
|
2024-03-21 20:44:35 +09:00
|
|
|
name: (curly_group_text
|
|
|
|
|
(text) @label)
|
2025-10-29 18:51:42 -07:00
|
|
|
(#eq? @label "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-03-21 20:44:35 +09:00
|
|
|
arg: (curly_group
|
2024-07-22 23:12:18 +02:00
|
|
|
(_) @markup.heading))
|
2024-01-06 15:05:50 +09:00
|
|
|
(#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-03-21 20:44:35 +09:00
|
|
|
arg: (curly_group
|
|
|
|
|
(_) @markup.italic))
|
2024-07-21 23:49:48 +02:00
|
|
|
(#any-of? @_name "\\emph" "\\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-03-21 20:44:35 +09:00
|
|
|
arg: (curly_group
|
|
|
|
|
(_) @markup.strong))
|
2024-01-06 15:05:50 +09:00
|
|
|
(#any-of? @_name "\\textbf" "\\mathbf"))
|
2022-02-04 11:29:46 +01:00
|
|
|
|
2024-09-10 00:18:15 +02:00
|
|
|
(generic_command
|
|
|
|
|
(command_name) @keyword.conditional
|
|
|
|
|
(#lua-match? @keyword.conditional "^\\if[a-zA-Z@]+$"))
|
|
|
|
|
|
|
|
|
|
(generic_command
|
|
|
|
|
(command_name) @keyword.conditional
|
|
|
|
|
(#any-of? @keyword.conditional "\\fi" "\\else"))
|
|
|
|
|
|
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
|
2024-07-19 12:24:46 +02:00
|
|
|
path: (curly_group_path) @string.special.path)
|
|
|
|
|
|
|
|
|
|
(verbatim_include
|
|
|
|
|
command: _ @keyword.import
|
|
|
|
|
path: (curly_group_path) @string.special.path)
|
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
|
2024-07-19 12:24:46 +02:00
|
|
|
directory: (curly_group_path) @string.special.path
|
|
|
|
|
file: (curly_group_path) @string.special.path)
|
2022-02-05 16:09:35 +01:00
|
|
|
|
2024-02-15 02:59:28 -05:00
|
|
|
(bibstyle_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
|
|
|
|
2024-02-15 02:59:28 -05:00
|
|
|
(bibtex_include
|
|
|
|
|
command: _ @keyword.import
|
2024-07-19 12:24:46 +02:00
|
|
|
paths: (curly_group_path_list) @string.special.path)
|
2024-02-15 02:59:28 -05: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
|
2024-07-19 12:24:46 +02:00
|
|
|
path: (curly_group_path) @string.special.path)
|
|
|
|
|
|
|
|
|
|
(svg_include
|
|
|
|
|
command: _ @keyword.import
|
|
|
|
|
path: (curly_group_path) @string.special.path)
|
|
|
|
|
|
|
|
|
|
(inkscape_include
|
|
|
|
|
command: _ @keyword.import
|
|
|
|
|
path: (curly_group_path) @string.special.path)
|
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
|
|
|
|
2024-06-18 21:03:28 +02:00
|
|
|
; Turn spelling off for whole nodes
|
|
|
|
|
[
|
2025-09-05 11:12:12 +02:00
|
|
|
(counter_declaration)
|
|
|
|
|
(counter_within_declaration)
|
|
|
|
|
(counter_without_declaration)
|
|
|
|
|
(counter_value)
|
|
|
|
|
(counter_definition)
|
|
|
|
|
(counter_addition)
|
|
|
|
|
(counter_increment)
|
|
|
|
|
(counter_typesetting)
|
2024-06-18 21:03:28 +02:00
|
|
|
(label_reference)
|
|
|
|
|
(label_reference_range)
|
|
|
|
|
(label_number)
|
|
|
|
|
(glossary_entry_reference)
|
|
|
|
|
(acronym_reference)
|
|
|
|
|
(color_definition)
|
|
|
|
|
(color_reference)
|
|
|
|
|
(class_include)
|
|
|
|
|
(package_include)
|
|
|
|
|
(latex_include)
|
|
|
|
|
(verbatim_include)
|
|
|
|
|
(import_include)
|
|
|
|
|
(bibstyle_include)
|
|
|
|
|
(bibtex_include)
|
|
|
|
|
(biblatex_include)
|
|
|
|
|
(graphics_include)
|
|
|
|
|
(svg_include)
|
|
|
|
|
(inkscape_include)
|
|
|
|
|
(tikz_library_import)
|
|
|
|
|
] @nospell
|
2024-02-04 09:01:25 -08:00
|
|
|
|
|
|
|
|
; Math
|
|
|
|
|
[
|
|
|
|
|
(displayed_equation)
|
|
|
|
|
(inline_formula)
|
2024-07-22 23:12:18 +02:00
|
|
|
] @markup.math @nospell
|
|
|
|
|
|
|
|
|
|
(math_environment
|
|
|
|
|
(_) @markup.math)
|
2024-02-05 10:10:18 -08:00
|
|
|
|
2024-07-22 23:12:18 +02:00
|
|
|
; Comments
|
2024-02-05 10:10:18 -08:00
|
|
|
[
|
|
|
|
|
(line_comment)
|
|
|
|
|
(block_comment)
|
|
|
|
|
(comment_environment)
|
|
|
|
|
] @comment @spell
|
|
|
|
|
|
2024-05-01 10:43:21 +02:00
|
|
|
((line_comment) @keyword.directive @nospell
|
2024-02-05 10:10:18 -08:00
|
|
|
(#lua-match? @keyword.directive "^%% !TeX"))
|
|
|
|
|
|
2024-05-01 10:43:21 +02:00
|
|
|
((line_comment) @keyword.directive @nospell
|
2024-02-05 10:10:18 -08:00
|
|
|
(#lua-match? @keyword.directive "^%%&"))
|