nvim-treesitter/queries/vimdoc/highlights.scm
Christian Clason 3ae78f376c fix(vimdoc): adapt to breaking Neovim change
Problem:
cb46f6e467 (diff-edf997b0c2d42d31828800641ac1f5a46487fe24a0d46ccf70bcd58a14f3868f)
introduced a regression on how `#set!` behaves with several matches in a
single pattern, breaking conceals in, e.g., taglinks.

Solution: Separate taglink etc. patterns into concealed marker and
contents. Also add URL support for concealed markdown links.
2024-03-14 18:54:22 +08:00

67 lines
1,014 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 ""))
(tag
text: (_) @label)
(taglink
"|" @markup.link
(#set! conceal ""))
(taglink
text: (_) @markup.link)
(optionlink
text: (_) @markup.link)
(codespan
"`" @markup.raw
(#set! conceal ""))
(codespan
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
(modeline) @keyword.directive
((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:"))