feat(checkhealth): use "help" syntax, avoid tabpage #20879

- If Nvim was just started, don't create a new tab.
- Name the buffer "health://".
- Use "help" syntax instead of "markdown". It fits better, and
  eliminates various workarounds.
- Simplfy formatting, avoid visual noise.
- Don't print a "INFO" status, it is noisy.
- Drop the ":" after statuses, they are already UPPERCASE and highlighted.
This commit is contained in:
Justin M. Keyes
2022-11-11 21:33:31 -05:00
committed by GitHub
parent 2425fe2dc5
commit 4d2373f5f6
5 changed files with 124 additions and 116 deletions

View File

@@ -359,14 +359,12 @@ local function check_terminal()
\ ..'\%(conemu\|vtpcon\|win32con\)')))
call health#report_error('command failed: '.cmd."\n".out)
else
call health#report_info('key_backspace (kbs) terminfo entry: '
\ .(empty(kbs_entry) ? '? (not found)' : kbs_entry))
call health#report_info('key_dc (kdch1) terminfo entry: '
\ .(empty(kbs_entry) ? '? (not found)' : kdch1_entry))
call health#report_info(printf('key_backspace (kbs) terminfo entry: `%s`', (empty(kbs_entry) ? '? (not found)' : kbs_entry)))
call health#report_info(printf('key_dc (kdch1) terminfo entry: `%s`', (empty(kbs_entry) ? '? (not found)' : kdch1_entry)))
endif
for env_var in ['XTERM_VERSION', 'VTE_VERSION', 'TERM_PROGRAM', 'COLORTERM', 'SSH_TTY']
if exists('$'.env_var)
call health#report_info(printf("$%s='%s'", env_var, eval('$'.env_var)))
call health#report_info(printf('$%s="%s"', env_var, eval('$'.env_var)))
endif
endfor
endf