2024-06-04 19:14:43 +02:00
|
|
|
(h1
|
|
|
|
|
(delimiter) @markup.heading.1
|
|
|
|
|
(heading) @markup.heading.1)
|
2024-01-06 15:05:50 +09:00
|
|
|
|
2024-06-04 19:14:43 +02:00
|
|
|
(h2
|
|
|
|
|
(delimiter) @markup.heading.2
|
|
|
|
|
(heading) @markup.heading.2)
|
2024-01-06 15:05:50 +09:00
|
|
|
|
2024-06-04 19:14:43 +02:00
|
|
|
(h3
|
|
|
|
|
(heading) @markup.heading.3)
|
2024-01-06 15:05:50 +09:00
|
|
|
|
2024-06-04 19:14:43 +02:00
|
|
|
(column_heading
|
|
|
|
|
(heading) @markup.heading.4)
|
2024-01-06 15:05:50 +09:00
|
|
|
|
2022-10-24 09:10:50 +02:00
|
|
|
(column_heading
|
2024-06-04 19:14:43 +02:00
|
|
|
(delimiter) @markup.heading.4
|
2024-01-06 15:05:50 +09:00
|
|
|
(#set! conceal ""))
|
|
|
|
|
|
2022-03-26 14:42:45 +01:00
|
|
|
(tag
|
2024-03-03 11:00:11 +01:00
|
|
|
"*" @label
|
2024-03-14 18:46:10 +08:00
|
|
|
(#set! conceal ""))
|
|
|
|
|
|
|
|
|
|
(tag
|
2024-01-06 15:05:50 +09:00
|
|
|
text: (_) @label)
|
|
|
|
|
|
2022-09-28 14:49:51 +02:00
|
|
|
(taglink
|
2024-01-06 15:05:50 +09:00
|
|
|
"|" @markup.link
|
2024-03-14 18:46:10 +08:00
|
|
|
(#set! conceal ""))
|
|
|
|
|
|
|
|
|
|
(taglink
|
2024-01-06 15:05:50 +09:00
|
|
|
text: (_) @markup.link)
|
|
|
|
|
|
2022-09-28 14:49:51 +02:00
|
|
|
(optionlink
|
2024-01-06 15:05:50 +09:00
|
|
|
text: (_) @markup.link)
|
|
|
|
|
|
2022-09-28 14:49:51 +02:00
|
|
|
(codespan
|
2024-03-03 11:00:11 +01:00
|
|
|
"`" @markup.raw
|
2024-03-14 18:46:10 +08:00
|
|
|
(#set! conceal ""))
|
|
|
|
|
|
|
|
|
|
(codespan
|
2024-01-06 15:05:50 +09:00
|
|
|
text: (_) @markup.raw)
|
|
|
|
|
|
|
|
|
|
((codeblock) @markup.raw.block
|
2024-07-27 16:28:19 -07:00
|
|
|
(#set! priority 90))
|
2024-01-06 15:05:50 +09:00
|
|
|
|
2022-10-24 09:10:50 +02:00
|
|
|
(codeblock
|
2024-03-03 11:00:11 +01:00
|
|
|
">" @markup.raw
|
|
|
|
|
(#set! conceal ""))
|
|
|
|
|
|
|
|
|
|
(codeblock
|
|
|
|
|
(language) @label
|
2024-01-06 15:05:50 +09:00
|
|
|
(#set! conceal ""))
|
|
|
|
|
|
2022-10-24 09:10:50 +02:00
|
|
|
(block
|
2024-03-03 11:00:11 +01:00
|
|
|
"<" @markup.raw
|
2024-01-06 15:05:50 +09:00
|
|
|
(#set! conceal ""))
|
|
|
|
|
|
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
|
|
|
(argument) @variable.parameter
|
2024-01-06 15:05:50 +09:00
|
|
|
|
2022-10-24 09:10:50 +02:00
|
|
|
(keycode) @string.special
|
2024-01-06 15:05:50 +09:00
|
|
|
|
2024-07-24 14:17:39 -05:00
|
|
|
((url) @string.special.url
|
2024-07-27 16:28:19 -07:00
|
|
|
(#set! @string.special.url url @string.special.url))
|
2024-01-06 15:05:50 +09:00
|
|
|
|
2024-03-11 18:55:36 +02:00
|
|
|
(modeline) @keyword.directive
|
|
|
|
|
|
2024-01-20 17:41:40 +01:00
|
|
|
((note) @comment.note
|
|
|
|
|
(#any-of? @comment.note "Note:" "NOTE:" "Notes:"))
|
2024-01-06 15:05:50 +09:00
|
|
|
|
feat!: align standard captures with upstream
Problem: Sharing highlight queries with upstream tree-sitter and
Helix is difficult.
Solution: Where reasonable, use capture names in tree-sitter's standard
list or Helix's Atom-style hierarchy.
Specifically:
* tree-sitter "standard capture names"
(https://github.com/tree-sitter/tree-sitter/blob/3f44b896852eb7daaa6df4fb778c9bb52c70c815/highlight/src/lib.rs#L20-L72):
- `@parameter` -> `@variable.parameter`
- `@field` -> `@variable.member`
- `@namespace` -> `@module`
- `@float` -> `@number.float`
- `@symbol` -> `@string.special.symbol`
- `@string.regex` -> `@string.regexp`
- `@text.*` -> `@markup.*` (`strong`, `italic`, `link`, `strikethrough`; with exceptions; see below)
- `@text.title` -> `@markup.heading`
- `@text.literal` -> `@markup.raw`
- `@text.reference` -> `@markup.link`
- `@text.uri` -> `@markup.link.url` (in markup links)
- `@string.special` -> `@markup.link.label` (non-url links)
- `@punctuation.special` -> `@markup.list` (markdown lists only; move subitems from `@text.todo`)
* Helix captures
(https://docs.helix-editor.com/master/themes.html#syntax-highlighting):
- `@method` -> `@function.method`
- `@method.call` -> `@function.method.call`
- `@text.{todo,warning,note,danger}` -> `@comment.{error,warning,hint,info,todo}`
- `@text.diff.{add,delete,}` -> `@diff.{plus,minus,delta}`
- `@text.uri` -> `@string.special.url` (outside markup)
- `@preproc` -> `@keyword.directive`
- `@define` -> `@keyword.directive`(`.define`?)
- `@storageclass` -> `@keyword.storage`
- `@conditional` -> `@keyword.conditional`
- `@debug` -> `@keyword.debug`
- `@exception` -> `@keyword.exception`
- `@include` -> `@keyword.import`
- `@repeat` -> `@keyword.repeat`
* cleanup
- remove some redundant `@conceal` (but still allow it for conceal-only patterns)
- remove obsolete `@error` (syntax linting is out of scope for this repo)
- sort, cleanup capture list in `CONTRIBUTING.md`
2023-12-24 10:00:20 +01:00
|
|
|
((note) @comment.warning
|
2024-01-06 15:05:50 +09:00
|
|
|
(#any-of? @comment.warning "Warning:" "WARNING:"))
|
|
|
|
|
|
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
|
|
|
((note) @comment.error
|
2024-01-06 15:05:50 +09:00
|
|
|
(#any-of? @comment.error "Deprecated:" "DEPRECATED:"))
|