neovim/runtime/queries/vimdoc/highlights.scm
Justin M. Keyes 09d76afe84
feat(defaults): pretty :help headings #30544
Problem:
Headings in :help do not stand out visually.

Solution:
Define a non-standard `@markup.heading.1.delimiter` group and
special-case it in `highlight_group.c`.

FUTURE:
This is a cheap workaround until we have #25718 which will enable:
- fully driven by `vimdoc/highlights.scm` instead of using highlight
  tricks (`guibg=bg guifg=bg guisp=fg`)
- better support of "cterm" ('notermguicolors')
2024-09-27 08:53:30 -07:00

75 lines
1.2 KiB
Scheme

(h1
(delimiter) @markup.heading.1.delimiter
(heading) @markup.heading.1)
(h2
(delimiter) @markup.heading.2.delimiter
(heading) @markup.heading.2)
(h3
(heading) @markup.heading.3)
(column_heading
(heading) @markup.heading.4)
(column_heading
(delimiter) @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
(#set! @string.special.url 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:"))