diff options
author | matveyt <35012635+matveyt@users.noreply.github.com> | 2021-12-18 19:14:42 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-12-18 09:14:42 -0700 |
commit | 734fba0d88cc9ff3b5fa24328e5ba7852e0e3211 (patch) | |
tree | 809ce43f8961909abd9bd126a8404624face1993 /runtime/autoload | |
parent | 36758ba9a78ecf01ab8f654be08051015932983a (diff) | |
download | rneovim-734fba0d88cc9ff3b5fa24328e5ba7852e0e3211.tar.gz rneovim-734fba0d88cc9ff3b5fa24328e5ba7852e0e3211.tar.bz2 rneovim-734fba0d88cc9ff3b5fa24328e5ba7852e0e3211.zip |
feat(runtime): new checkhealth filetype (#16660)
Diffstat (limited to 'runtime/autoload')
-rw-r--r-- | runtime/autoload/health.vim | 36 |
1 files changed, 3 insertions, 33 deletions
diff --git a/runtime/autoload/health.vim b/runtime/autoload/health.vim index 73c1459f86..1d462ad02c 100644 --- a/runtime/autoload/health.vim +++ b/runtime/autoload/health.vim @@ -1,27 +1,3 @@ -function! s:enhance_syntax() abort - syntax case match - - syntax keyword healthError ERROR[:] - \ containedin=markdownCodeBlock,mkdListItemLine - highlight default link healthError Error - - syntax keyword healthWarning WARNING[:] - \ containedin=markdownCodeBlock,mkdListItemLine - highlight default link healthWarning WarningMsg - - syntax keyword healthSuccess OK[:] - \ containedin=markdownCodeBlock,mkdListItemLine - highlight default healthSuccess guibg=#5fff00 guifg=#080808 ctermbg=82 ctermfg=232 - - syntax match healthHelp "|.\{-}|" contains=healthBar - \ containedin=markdownCodeBlock,mkdListItemLine - syntax match healthBar "|" contained conceal - highlight default link healthHelp Identifier - - " We do not care about markdown syntax errors in :checkhealth output. - highlight! link markdownError Normal -endfunction - " Runs the specified healthchecks. " Runs all discovered healthchecks if a:plugin_names is empty. function! health#check(plugin_names) abort @@ -29,13 +5,9 @@ function! health#check(plugin_names) abort \ ? s:discover_healthchecks() \ : s:get_healthcheck(a:plugin_names) - tabnew - setlocal wrap breakindent linebreak - setlocal filetype=markdown - setlocal conceallevel=2 concealcursor=nc - setlocal keywordprg=:help - let &l:iskeyword='!-~,^*,^|,^",192-255' - call s:enhance_syntax() + " create scratch-buffer + execute 'tab sbuffer' nvim_create_buf(v:true, v:true) + setfiletype checkhealth if empty(healthchecks) call setline(1, 'ERROR: No healthchecks found.') @@ -70,8 +42,6 @@ function! health#check(plugin_names) abort " needed for plasticboy/vim-markdown, because it uses fdm=expr normal! zR - setlocal nomodified - setlocal bufhidden=hide redraw|echo '' endfunction |