aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJustin M. Keyes <justinkz@gmail.com>2024-09-27 08:53:30 -0700
committerGitHub <noreply@github.com>2024-09-27 08:53:30 -0700
commit09d76afe84dd5b895e102dcd8df8ce6271bebfef (patch)
treeb6a3f1d213c5ef075139ab863e856f4c71a9b968 /src
parentf55213ce0e2b0053ded8416e8ae922a0e406012f (diff)
downloadrneovim-09d76afe84dd5b895e102dcd8df8ce6271bebfef.tar.gz
rneovim-09d76afe84dd5b895e102dcd8df8ce6271bebfef.tar.bz2
rneovim-09d76afe84dd5b895e102dcd8df8ce6271bebfef.zip
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')
Diffstat (limited to 'src')
-rw-r--r--src/nvim/highlight_group.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/nvim/highlight_group.c b/src/nvim/highlight_group.c
index b4dcb4b6d0..1a0ae3ac49 100644
--- a/src/nvim/highlight_group.c
+++ b/src/nvim/highlight_group.c
@@ -301,6 +301,11 @@ static const char *highlight_init_both[] = {
"default link @tag Tag",
"default link @tag.builtin Special",
+ // :help
+ // Higlight "===" and "---" heading delimiters specially.
+ "default @markup.heading.1.delimiter.vimdoc guibg=bg guifg=bg guisp=fg gui=underdouble,nocombine ctermbg=NONE ctermfg=NONE cterm=underdouble,nocombine",
+ "default @markup.heading.2.delimiter.vimdoc guibg=bg guifg=bg guisp=fg gui=underline,nocombine ctermbg=NONE ctermfg=NONE cterm=underline,nocombine",
+
// LSP semantic tokens
"default link @lsp.type.class @type",
"default link @lsp.type.comment @comment",