feat(ex_checkhealth): provide function for command line completion

Move away from providing completion with ExpandRTDir to ExpandGeneric
providing the function get_healthcheck_name which caches the results for
the current command line prompt.

It does the almost the same thing the Vim function 'get_healthcheck'
implemented in 'runtime/autoload/health.vim' does.
This commit is contained in:
Javier López
2021-09-23 20:33:43 -05:00
parent 8f2a8b50da
commit 8b43b07333
2 changed files with 79 additions and 4 deletions

View File

@@ -36,6 +36,7 @@ describe(':checkhealth', function()
clear()
eq('nvim', getcompletion('nvim', 'checkhealth')[1])
eq('provider', getcompletion('prov', 'checkhealth')[1])
eq('vim.lsp', getcompletion('vim.ls', 'checkhealth')[1])
end)
end)