nvim-treesitter/queries/vimdoc/highlights.scm
Christian Clason 99ddf57353
feat(highlights)!: enforce documented captures (#6232)
Problem: Allowing undocumented "secret" (sub)captures makes it harder
to write comprehensive colorschemes and catch inconsistent captures.

Solution: Only allow captures listed in CONTRIBUTING.md. Add useful
(cross-language) subcaptures and drop language-specific or too niche
ones.

Follow-up: Adding further `*.builtin` captures and changing queries to
use them.

Language-specific subcaptures should instead be added in user config or
a custom language plugin.
2024-03-03 11:00:11 +01:00

59 lines
953 B
Scheme

(h1) @markup.heading.1
(h2) @markup.heading.2
(h3) @markup.heading.3
(column_heading) @markup.heading.4
(column_heading
"~" @markup.heading.4
(#set! conceal ""))
(tag
"*" @label
(#set! conceal "")
text: (_) @label)
(taglink
"|" @markup.link
(#set! conceal "")
text: (_) @markup.link)
(optionlink
text: (_) @markup.link)
(codespan
"`" @markup.raw
(#set! conceal "")
text: (_) @markup.raw)
((codeblock) @markup.raw.block
(#set! "priority" 90))
(codeblock
">" @markup.raw
(#set! conceal ""))
(codeblock
(language) @label
(#set! conceal ""))
(block
"<" @markup.raw
(#set! conceal ""))
(argument) @variable.parameter
(keycode) @string.special
(url) @string.special.url
((note) @comment.note
(#any-of? @comment.note "Note:" "NOTE:" "Notes:"))
((note) @comment.warning
(#any-of? @comment.warning "Warning:" "WARNING:"))
((note) @comment.error
(#any-of? @comment.error "Deprecated:" "DEPRECATED:"))