diff options
| author | William Boman <william@redwill.se> | 2021-10-18 13:59:43 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-10-18 13:59:43 +0200 |
| commit | cee25503cd6df85366c5106c40cc5240634e647e (patch) | |
| tree | 6e242bc0b0c5a6c3e40b165323a6c1a9c20576a1 /plugin/nvim-lsp-installer.vim | |
| parent | Remove the pdflatex check (#174) (diff) | |
| download | mason-cee25503cd6df85366c5106c40cc5240634e647e.tar mason-cee25503cd6df85366c5106c40cc5240634e647e.tar.gz mason-cee25503cd6df85366c5106c40cc5240634e647e.tar.bz2 mason-cee25503cd6df85366c5106c40cc5240634e647e.tar.lz mason-cee25503cd6df85366c5106c40cc5240634e647e.tar.xz mason-cee25503cd6df85366c5106c40cc5240634e647e.tar.zst mason-cee25503cd6df85366c5106c40cc5240634e647e.zip | |
speed up :LspInstall, :LspUninstall, :LspUninstallAll commands (#175)
- `:LspUninstallAll` now just nukes the entire install directory immediately,
instead of uninstalling each server one by one. There's also a confirmation
prompt now.
- `:LspInstall` & `:LspUninstall` now sources its autocompletion directly from
a Lua table, instead of sourcing the server names from each server module (thus
avoiding unnecessary `require` calls).
Diffstat (limited to 'plugin/nvim-lsp-installer.vim')
| -rw-r--r-- | plugin/nvim-lsp-installer.vim | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/plugin/nvim-lsp-installer.vim b/plugin/nvim-lsp-installer.vim index 2cd3485b..3050d865 100644 --- a/plugin/nvim-lsp-installer.vim +++ b/plugin/nvim-lsp-installer.vim @@ -4,16 +4,12 @@ let g:loaded_nvim_lsp_installer = v:true let s:save_cpo = &cpo set cpo&vim -function! s:MapServerName(servers) abort - return map(a:servers, {_, val -> val.name}) -endfunction - function! s:LspInstallCompletion(...) abort - return join(sort(s:MapServerName(luaeval("require'nvim-lsp-installer.servers'.get_available_servers()"))), "\n") + return join(luaeval("require'nvim-lsp-installer.servers'.get_available_server_names()"), "\n") endfunction function! s:LspUninstallCompletion(...) abort - return join(sort(s:MapServerName(luaeval("require'nvim-lsp-installer.servers'.get_installed_servers()"))), "\n") + return join(luaeval("require'nvim-lsp-installer.servers'.get_installed_server_names()"), "\n") endfunction function! s:LspInstall(server_names) abort |
