aboutsummaryrefslogtreecommitdiff
path: root/plugin
diff options
context:
space:
mode:
authorYasuhiro Matsumoto <mattn.jp@gmail.com>2020-01-27 13:07:08 +0900
committerYasuhiro Matsumoto <mattn.jp@gmail.com>2020-01-27 13:07:08 +0900
commit1a83260ff247e156ec81ee703bc2fba7db50582a (patch)
tree820f0fd3e61c6971cfe8845b0fc9a4fe2b473b64 /plugin
parentd83e45e1a1f5b16dab688c9e1e1d4789a46b28bb (diff)
downloadvim-lsp-settings-1a83260ff247e156ec81ee703bc2fba7db50582a.tar.gz
vim-lsp-settings-1a83260ff247e156ec81ee703bc2fba7db50582a.tar.bz2
vim-lsp-settings-1a83260ff247e156ec81ee703bc2fba7db50582a.zip
Add sql-language-server
Diffstat (limited to 'plugin')
-rw-r--r--plugin/lsp_settings.vim16
1 files changed, 6 insertions, 10 deletions
diff --git a/plugin/lsp_settings.vim b/plugin/lsp_settings.vim
index 70aec73..2fade35 100644
--- a/plugin/lsp_settings.vim
+++ b/plugin/lsp_settings.vim
@@ -50,10 +50,6 @@ function! s:vim_lsp_installer(ft, ...) abort
if empty(l:server)
return []
endif
- let l:name = get(a:000, 0, '')
- if !empty(l:name)
- return filter(copy(l:server), 'l:conf.command ==# l:name')
- endif
let l:found = {}
for l:conf in l:server
let l:missing = 0
@@ -71,12 +67,12 @@ function! s:vim_lsp_installer(ft, ...) abort
if empty(l:found)
return []
endif
+ let l:name = get(a:000, 0, '')
for l:conf in l:server
- let l:command = s:vim_lsp_settings_get(l:conf.command, 'cmd', l:conf.command)
- if type(l:command) == type([])
- let l:command = l:command[0]
+ if !empty(l:name) && l:conf.command != l:name
+ continue
endif
- let l:command = printf('%s/install-%s', s:installer_dir, l:command)
+ let l:command = printf('%s/install-%s', s:installer_dir, l:conf.command)
if has('win32')
let l:command = substitute(l:command, '/', '\', 'g') . '.cmd'
else
@@ -141,7 +137,7 @@ function! s:vim_lsp_settings_suggest(ft) abort
echohl Directory
echomsg 'Please do :LspInstallServer to enable Language Server'
echohl None
- command! -nargs=? -buffer LspInstallServer call s:vim_lsp_install_server(&l:filetype, <q-args>)
+ command! -nargs=? -buffer -complete=customlist,lsp_settings#complete_installer LspInstallServer call s:vim_lsp_install_server(&l:filetype, <q-args>)
endif
endfunction
@@ -263,7 +259,7 @@ function! s:vim_lsp_load_or_suggest(ft) abort
else
doautocmd User lsp_setup
if exists(':LspInstallServer') !=# 2
- command! -nargs=? -buffer LspInstallServer call s:vim_lsp_install_server(&l:filetype, <q-args>)
+ command! -nargs=? -buffer -complete=customlist,lsp_settings#complete_installer LspInstallServer call s:vim_lsp_install_server(&l:filetype, <q-args>)
endif
endif