feat(health): highlight headings #30525

Problem:
checkhealth report sections are not visually separated.

Solution:
Highlight with "reverse".

TODO: migrate checkhealth filetype to use treesitter.
TODO: default :help should also highlight headings more boldy!
This commit is contained in:
Justin M. Keyes
2024-09-26 07:45:03 -07:00
committed by GitHub
parent efcfcb1efc
commit f2fa4ca97e
3 changed files with 48 additions and 35 deletions

View File

@@ -14,7 +14,9 @@ syn case match
syn keyword DiagnosticError ERROR[:]
syn keyword DiagnosticWarn WARNING[:]
syn keyword DiagnosticOk OK[:]
syn match helpSectionDelim "^======*\n.*$"
syn match healthHeadingChar "=" conceal cchar=contained containedin=helpSectionDelim
" Note: hs=e starts higlighting on the title line (instead of the "===" line).
syn match helpSectionDelim /^======*\n.*$/hs=e
highlight helpSectionDelim gui=reverse cterm=reverse
syn match healthHeadingChar "=" conceal cchar= contained containedin=helpSectionDelim
let b:current_syntax = "checkhealth"