diff options
Diffstat (limited to 'runtime')
-rw-r--r-- | runtime/lua/vim/health.lua | 9 | ||||
-rw-r--r-- | runtime/syntax/checkhealth.vim | 6 |
2 files changed, 12 insertions, 3 deletions
diff --git a/runtime/lua/vim/health.lua b/runtime/lua/vim/health.lua index f260d44b50..52a7a13966 100644 --- a/runtime/lua/vim/health.lua +++ b/runtime/lua/vim/health.lua @@ -379,7 +379,14 @@ function M._check(mods, plugin_names) s_output = {} M.error('The healthcheck report for "' .. name .. '" plugin is empty.') end - local header = { string.rep('=', 78), name .. ': ' .. func, '' } + + local header = { + string.rep('=', 78), + -- Example: `foo.health: [ …] require("foo.health").check()` + ('%s: %s%s'):format(name, (' '):rep(76 - name:len() - func:len()), func), + '', + } + -- remove empty line after header from report_start if s_output[1] == '' then local tmp = {} ---@type string[] diff --git a/runtime/syntax/checkhealth.vim b/runtime/syntax/checkhealth.vim index 2fd0aed601..a4f6e016cb 100644 --- a/runtime/syntax/checkhealth.vim +++ b/runtime/syntax/checkhealth.vim @@ -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" |