aboutsummaryrefslogtreecommitdiffstats
path: root/plugin
diff options
context:
space:
mode:
Diffstat (limited to 'plugin')
-rw-r--r--plugin/nvim-lsp-installer.vim29
1 files changed, 19 insertions, 10 deletions
diff --git a/plugin/nvim-lsp-installer.vim b/plugin/nvim-lsp-installer.vim
index cd610f3c..1cd772ef 100644
--- a/plugin/nvim-lsp-installer.vim
+++ b/plugin/nvim-lsp-installer.vim
@@ -10,36 +10,45 @@ function! s:MapServerName(servers) abort
endfunction
function! s:LspInstallCompletion(...) abort
- return join(sort(s:MapServerName(luaeval("require'nvim-lsp-installer'.get_available_servers()"))), "\n")
+ return join(sort(s:MapServerName(luaeval("require'nvim-lsp-installer.servers'.get_available_servers()"))), "\n")
endfunction
function! s:LspUninstallCompletion(...) abort
- return join(sort(s:MapServerName(luaeval("require'nvim-lsp-installer'.get_installed_servers()"))), "\n")
+ return join(sort(s:MapServerName(luaeval("require'nvim-lsp-installer.servers'.get_installed_servers()"))), "\n")
endfunction
-function! s:LspInstall(server_name) abort
- call luaeval("require'nvim-lsp-installer'.install(_A)", a:server_name)
+function! s:LspInstall(server_names) abort
+ for server_name in split(a:server_names, " ")
+ call luaeval("require'nvim-lsp-installer'.install(_A)", server_name)
+ endfor
endfunction
-function! s:LspUninstall(server_name) abort
- call luaeval("require'nvim-lsp-installer'.uninstall(_A)", a:server_name)
+function! s:LspUninstall(server_names) abort
+ for server_name in split(a:server_names, " ")
+ call luaeval("require'nvim-lsp-installer'.uninstall(_A)", server_name)
+ endfor
endfunction
function! s:LspUninstallAll() abort
- for server in s:MapServerName(luaeval("require'nvim-lsp-installer'.get_installed_servers()"))
+ for server in s:MapServerName(luaeval("require'nvim-lsp-installer.servers'.get_installed_servers()"))
call s:LspUninstall(server)
endfor
endfunction
function! s:LspPrintInstalled() abort
- echo s:MapServerName(luaeval("require'nvim-lsp-installer'.get_installed_servers()"))
+ echo s:MapServerName(luaeval("require'nvim-lsp-installer.servers'.get_installed_servers()"))
+endfunction
+
+function! s:LspInstallInfo() abort
+ lua require'nvim-lsp-installer'.display()
endfunction
-command! -nargs=1 -complete=custom,s:LspInstallCompletion LspInstall exe s:LspInstall("<args>")
-command! -nargs=1 -complete=custom,s:LspUninstallCompletion LspUninstall exe s:LspUninstall("<args>")
+command! -nargs=+ -complete=custom,s:LspInstallCompletion LspInstall exe s:LspInstall("<args>")
+command! -nargs=+ -complete=custom,s:LspUninstallCompletion LspUninstall exe s:LspUninstall("<args>")
command! LspUninstallAll call s:LspUninstallAll()
command! LspPrintInstalled call s:LspPrintInstalled()
+command! LspInstallInfo call s:LspInstallInfo()
autocmd User LspAttachBuffers lua require"nvim-lsp-installer".lsp_attach_proxy()