aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--plugin/lsp_setup.vim9
-rw-r--r--settings/clangd.vim2
-rw-r--r--settings/clojure-lsp.vim2
-rw-r--r--settings/css-languageserver.vim2
-rw-r--r--settings/eclipse-jdt-ls.vim2
-rw-r--r--settings/emmylua-ls.vim2
-rw-r--r--settings/gopls.vim2
-rw-r--r--settings/html-languageserver.vim2
-rw-r--r--settings/intelephense-server.vim2
-rw-r--r--settings/javascript-typescript-langserver.vim2
-rw-r--r--settings/kotlin-language-server.vim2
-rw-r--r--settings/omnisharp-node-client.vim2
-rw-r--r--settings/pyls.vim2
-rw-r--r--settings/rls.vim2
-rw-r--r--settings/solargraph.vim2
-rw-r--r--settings/typescript-language-server.vim2
-rw-r--r--settings/vim-language-server.vim2
17 files changed, 24 insertions, 17 deletions
diff --git a/plugin/lsp_setup.vim b/plugin/lsp_setup.vim
index 8145708..9deb09f 100644
--- a/plugin/lsp_setup.vim
+++ b/plugin/lsp_setup.vim
@@ -53,6 +53,9 @@ function! s:vimlsp_installer() abort
return ''
endif
let l:command = s:vimlsp_settings_get(l:setting[0].command, 'cmd', l:setting[0].command)
+ if type(l:command) == type([])
+ let l:command = l:command[0]
+ endif
let l:command = printf('%s/install-%s', s:installer_dir, l:command)
if has('win32')
let l:command = substitute(l:command, '/', '\', 'g') . '.cmd'
@@ -101,7 +104,11 @@ function! s:vimlsp_setting() abort
continue
endif
for l:server in s:settings[l:ft]
- if s:executable(s:vimlsp_settings_get(l:server.command, 'cmd', l:server.command))
+ let l:command = s:vimlsp_settings_get(l:server.command, 'cmd', l:server.command)
+ if type(l:command) == type([])
+ let l:command = l:command[0]
+ endif
+ if s:executable(l:command)
let l:script = printf('%s/%s.vim', s:settings_dir, l:server.command)
if filereadable(l:script)
exe 'source' l:script
diff --git a/settings/clangd.vim b/settings/clangd.vim
index 4c9ba11..d9beadf 100644
--- a/settings/clangd.vim
+++ b/settings/clangd.vim
@@ -2,7 +2,7 @@ augroup vimlsp_settings_clangd
au!
autocmd User lsp_setup call lsp#register_server({
\ 'name': 'clangd',
- \ 'cmd': lsp_settings#get('clangd', 'cmd', {server_info->[lsp_settings#exec_path('clangd')]}),
+ \ 'cmd': {server_info->lsp_settings#get('clangd', 'cmd', [lsp_settings#exec_path('clangd')])},
\ 'initialization_options': lsp_settings#get('clangd', 'initialization_options', v:null),
\ 'whitelist': lsp_settings#get('clangd', 'whitelist', ['c', 'cpp', 'objc', 'objcpp']),
\ 'blacklist': lsp_settings#get('clangd', 'blacklist', []),
diff --git a/settings/clojure-lsp.vim b/settings/clojure-lsp.vim
index 38590da..09301a0 100644
--- a/settings/clojure-lsp.vim
+++ b/settings/clojure-lsp.vim
@@ -2,7 +2,7 @@ augroup vimlsp_settings_clojure_lsp
au!
autocmd User lsp_setup call lsp#register_server({
\ 'name': 'clojure-lsp',
- \ 'cmd': lsp_settings#get('clojure-lsp', 'cmd', {server_info->[lsp_settings#exec_path('clojure-lsp')]}),
+ \ 'cmd': {server_info->lsp_settings#get('clojure-lsp', 'cmd', [lsp_settings#exec_path('clojure-lsp')])},
\ 'initialization_options': lsp_settings#get('clojure-lsp', 'initialization_options', v:null),
\ 'whitelist': lsp_settings#get('clojure-lsp', 'whitelist', ['clojure']),
\ 'blacklist': lsp_settings#get('clojure-lsp', 'blacklist', []),
diff --git a/settings/css-languageserver.vim b/settings/css-languageserver.vim
index 3026f39..114ab21 100644
--- a/settings/css-languageserver.vim
+++ b/settings/css-languageserver.vim
@@ -2,7 +2,7 @@ augroup vimlsp_settings_css_languageserver
au!
autocmd User lsp_setup call lsp#register_server({
\ 'name': 'css-languageserver',
- \ 'cmd': lsp_settings#get('css-languageserver', 'cmd', {server_info->[lsp_settings#exec_path('css-languageserver'), '--stdio']}),
+ \ 'cmd': {server_info->lsp_settings#get('css-languageserver', 'cmd', [lsp_settings#exec_path('css-languageserver'), '--stdio'])},
\ 'initialization_options': lsp_settings#get('css-languageserver', 'initialization_options', v:null),
\ 'whitelist': lsp_settings#get('css-languageserver', 'whitelist', ['css']),
\ 'blacklist': lsp_settings#get('css-languageserver', 'blacklist', []),
diff --git a/settings/eclipse-jdt-ls.vim b/settings/eclipse-jdt-ls.vim
index 5a6221b..c8dd07f 100644
--- a/settings/eclipse-jdt-ls.vim
+++ b/settings/eclipse-jdt-ls.vim
@@ -2,7 +2,7 @@ augroup vimlsp_settings_eclipse_jdt_ls
au!
autocmd User lsp_setup call lsp#register_server({
\ 'name': 'eclipse-jdt-ls',
- \ 'cmd': lsp_settings#get('eclipse-jdt-ls', 'cmd', {server_info->[lsp_settings#exec_path('eclipse-jdt-ls')]}),
+ \ 'cmd': {server_info->lsp_settings#get('eclipse-jdt-ls', 'cmd', [lsp_settings#exec_path('eclipse-jdt-ls')])},
\ 'initialization_options': lsp_settings#get('eclipse-jdt-ls', 'initialization_options', v:null),
\ 'whitelist': lsp_settings#get('eclipse-jdt-ls', 'whitelist', ['java']),
\ 'blacklist': lsp_settings#get('eclipse-jdt-ls', 'blacklist', []),
diff --git a/settings/emmylua-ls.vim b/settings/emmylua-ls.vim
index 08f94ac..4df376f 100644
--- a/settings/emmylua-ls.vim
+++ b/settings/emmylua-ls.vim
@@ -2,7 +2,7 @@ augroup vimlsp_settings_emmylua_ls
au!
autocmd User lsp_setup call lsp#register_server({
\ 'name': 'emmylua-ls',
- \ 'cmd': lsp_settings#get('emmylua-ls', 'cmd', {server_info->[lsp_settings#exec_path('emmylua-ls')]}),
+ \ 'cmd': {server_info->lsp_settings#get('emmylua-ls', 'cmd', [lsp_settings#exec_path('emmylua-ls')])},
\ 'initialization_options': lsp_settings#get('emmylua-ls', 'initialization_options', v:null),
\ 'whitelist': lsp_settings#get('emmylua-ls', 'whitelist', ['lua']),
\ 'blacklist': lsp_settings#get('emmylua-ls', 'blacklist', []),
diff --git a/settings/gopls.vim b/settings/gopls.vim
index c5fcc88..59bb801 100644
--- a/settings/gopls.vim
+++ b/settings/gopls.vim
@@ -2,7 +2,7 @@ augroup vimlsp_settings_gopls
au!
autocmd User lsp_setup call lsp#register_server({
\ 'name': 'gopls',
- \ 'cmd': lsp_settings#get('gopls', 'cmd', {server_info->[lsp_settings#exec_path('gopls')]}),
+ \ 'cmd': {server_info->lsp_settings#get('gopls', 'cmd', [lsp_settings#exec_path('gopls')])},
\ 'initialization_options': lsp_settings#get('gopls', 'initialization_options', {"diagnostics": "true"}),
\ 'whitelist': lsp_settings#get('gopls', 'whitelist', ['go']),
\ 'blacklist': lsp_settings#get('gopls', 'blacklist', []),
diff --git a/settings/html-languageserver.vim b/settings/html-languageserver.vim
index b07d818..cbe517e 100644
--- a/settings/html-languageserver.vim
+++ b/settings/html-languageserver.vim
@@ -2,7 +2,7 @@ augroup vimlsp_settings_html_languageserver
au!
autocmd User lsp_setup call lsp#register_server({
\ 'name': 'html-languageserver',
- \ 'cmd': lsp_settings#get('html-languageserver', 'cmd', {server_info->[lsp_settings#exec_path('html-languageserver'), '--stdio']}),
+ \ 'cmd': {server_info->lsp_settings#get('html-languageserver', 'cmd', [lsp_settings#exec_path('html-languageserver'), '--stdio'])},
\ 'initialization_options': lsp_settings#get('html-languageserver', 'initialization_options', v:null),
\ 'whitelist': lsp_settings#get('html-languageserver', 'whitelist', ['html']),
\ 'blacklist': lsp_settings#get('html-languageserver', 'blacklist', []),
diff --git a/settings/intelephense-server.vim b/settings/intelephense-server.vim
index ef10860..020e99e 100644
--- a/settings/intelephense-server.vim
+++ b/settings/intelephense-server.vim
@@ -2,7 +2,7 @@ augroup vimlsp_settings_intelephense_server
au!
autocmd User lsp_setup call lsp#register_server({
\ 'name': 'intelephense',
- \ 'cmd': lsp_settings#get('intelephense', 'cmd', {server_info->[lsp_settings#exec_path('intelephense-server'), '--stdio']}),
+ \ 'cmd': {server_info->lsp_settings#get('intelephense', 'cmd', [lsp_settings#exec_path('intelephense-server'), '--stdio'])},
\ 'whitelist': lsp_settings#get('intelephense', 'whitelist', ['php']),
\ 'blacklist': lsp_settings#get('intelephense', 'blacklist', []),
\ 'config': lsp_settings#get('intelephense', 'config', {}),
diff --git a/settings/javascript-typescript-langserver.vim b/settings/javascript-typescript-langserver.vim
index e9a5ea6..094c4ad 100644
--- a/settings/javascript-typescript-langserver.vim
+++ b/settings/javascript-typescript-langserver.vim
@@ -2,7 +2,7 @@ augroup vimlsp_settings_javascript_typescript_langserver
au!
autocmd User lsp_setup call lsp#register_server({
\ 'name': 'javascript-typescript-langserver',
- \ 'cmd': lsp_settings#get('javascript-typescript-langserver', 'cmd', {server_info->[lsp_settings#exec_path('javascript-typescript-langserver'), '--stdio']}),
+ \ 'cmd': {server_info->lsp_settings#get('javascript-typescript-langserver', 'cmd', [lsp_settings#exec_path('javascript-typescript-langserver'), '--stdio'])},
\ 'root_uri':{server_info->lsp#utils#path_to_uri(lsp#utils#find_nearest_parent_file_directory(lsp#utils#get_buffer_path(), 'tsconfig.json'))},
\ 'initialization_options': lsp_settings#get('javascript-typescript-langserver', 'initialization_options', {"diagnostics": "true"}),
\ 'whitelist': lsp_settings#get('javascript-typescript-langserver', 'whitelist', ['typescript', 'typescript.tsx']),
diff --git a/settings/kotlin-language-server.vim b/settings/kotlin-language-server.vim
index ebc2c94..033c3ee 100644
--- a/settings/kotlin-language-server.vim
+++ b/settings/kotlin-language-server.vim
@@ -2,7 +2,7 @@ augroup vimlsp_settings_kotlin_language_server
au!
autocmd User lsp_setup call lsp#register_server({
\ 'name': 'kotlin-language-server',
- \ 'cmd': lsp_settings#get('kotlin-language-server', 'cmd', {server_info->[lsp_settings#exec_path('kotlin-language-server')]}),
+ \ 'cmd': {server_info->lsp_settings#get('kotlin-language-server', 'cmd', [lsp_settings#exec_path('kotlin-language-server')])},
\ 'initialization_options': lsp_settings#get('kotlin-language-server', 'initialization_options', v:null),
\ 'whitelist': lsp_settings#get('kotlin-language-server', 'whitelist', ['kotlin']),
\ 'blacklist': lsp_settings#get('kotlin-language-server', 'blacklist', []),
diff --git a/settings/omnisharp-node-client.vim b/settings/omnisharp-node-client.vim
index 4f99d71..1d4d340 100644
--- a/settings/omnisharp-node-client.vim
+++ b/settings/omnisharp-node-client.vim
@@ -2,7 +2,7 @@ augroup vimlsp_settings_omnisharp-node-client
au!
autocmd User lsp_setup call lsp#register_server({
\ 'name': 'omnisharp-node-client',
- \ 'cmd': lsp_settings#get('omnisharp-node-client', 'cmd', {server_info->[lsp_settings#exec_path('omnisharp-node-client')]}),
+ \ 'cmd': {server_info->lsp_settings#get('omnisharp-node-client', 'cmd', [lsp_settings#exec_path('omnisharp-node-client')])},
\ 'initialization_options': lsp_settings#get('omnisharp-node-client', 'initialization_options', v:null),
\ 'whitelist': lsp_settings#get('omnisharp-node-client', 'whitelist', ['cs']),
\ 'blacklist': lsp_settings#get('omnisharp-node-client', 'blacklist', []),
diff --git a/settings/pyls.vim b/settings/pyls.vim
index 177a429..e57ec82 100644
--- a/settings/pyls.vim
+++ b/settings/pyls.vim
@@ -2,7 +2,7 @@ augroup vimlsp_settings_pyls
au!
autocmd User lsp_setup call lsp#register_server({
\ 'name': 'pyls',
- \ 'cmd': lsp_settings#get('pyls', 'cmd', {server_info->[lsp_settings#exec_path('pyls')]}),
+ \ 'cmd': {server_info->lsp_settings#get('pyls', 'cmd', [lsp_settings#exec_path('pyls')])},
\ 'initialization_options': lsp_settings#get('pyls', 'initialization_options', v:null),
\ 'whitelist': lsp_settings#get('pyls', 'whitelist', ['python']),
\ 'blacklist': lsp_settings#get('pyls', 'blacklist', []),
diff --git a/settings/rls.vim b/settings/rls.vim
index 4267795..0b0fe59 100644
--- a/settings/rls.vim
+++ b/settings/rls.vim
@@ -2,7 +2,7 @@ augroup vimlsp_settings_rls
au!
autocmd User lsp_setup call lsp#register_server({
\ 'name': 'rls',
- \ 'cmd': lsp_settings#get('rls', 'cmd', {server_info->[lsp_settings#exec_path('rls')]}),
+ \ 'cmd': {server_info->lsp_settings#get('rls', 'cmd', [lsp_settings#exec_path('rls')])},
\ 'initialization_options': lsp_settings#get('rls', 'initialization_options', v:null),
\ 'whitelist': lsp_settings#get('rls', 'whitelist', ['rust']),
\ 'blacklist': lsp_settings#get('rls', 'blacklist', []),
diff --git a/settings/solargraph.vim b/settings/solargraph.vim
index f86be72..2a630db 100644
--- a/settings/solargraph.vim
+++ b/settings/solargraph.vim
@@ -2,7 +2,7 @@ augroup vimlsp_settings_solargraph
au!
autocmd User lsp_setup call lsp#register_server({
\ 'name': 'solargraph',
- \ 'cmd': lsp_settings#get('solargraph', 'cmd', {server_info->[lsp_settings#exec_path('solargraph'), 'stdio']}),
+ \ 'cmd': {server_info->lsp_settings#get('solargraph', 'cmd', [lsp_settings#exec_path('solargraph'), 'stdio'])},
\ 'initialization_options': lsp_settings#get('solargraph', 'initialization_options', {"diagnostics": "true"}),
\ 'whitelist': lsp_settings#get('solargraph', 'whitelist', ['ruby']),
\ 'blacklist': lsp_settings#get('solargraph', 'blacklist', []),
diff --git a/settings/typescript-language-server.vim b/settings/typescript-language-server.vim
index f9bb5f1..9cc2372 100644
--- a/settings/typescript-language-server.vim
+++ b/settings/typescript-language-server.vim
@@ -2,7 +2,7 @@ augroup vimlsp_settings_typescript_language_server
au!
autocmd User lsp_setup call lsp#register_server({
\ 'name': 'typescript-language-server',
- \ 'cmd': lsp_settings#get('typescript-language-server', 'cmd', {server_info->[lsp_settings#exec_path('typescript-language-server'), '--stdio']}),
+ \ 'cmd': {server_info->lsp_settings#get('typescript-language-server', 'cmd', [lsp_settings#exec_path('typescript-language-server'), '--stdio'])},
\ 'root_uri':{server_info->lsp#utils#path_to_uri(lsp#utils#find_nearest_parent_file_directory(lsp#utils#get_buffer_path(), 'tsconfig.json'))},
\ 'initialization_options': lsp_settings#get('typescript-language-server', 'initialization_options', {"diagnostics": "true"}),
\ 'whitelist': lsp_settings#get('typescript-language-server', 'whitelist', ['typescript', 'typescript.tsx']),
diff --git a/settings/vim-language-server.vim b/settings/vim-language-server.vim
index 6932aa9..3fffea0 100644
--- a/settings/vim-language-server.vim
+++ b/settings/vim-language-server.vim
@@ -2,7 +2,7 @@ augroup vimlsp_settings_vim_language_server
au!
autocmd User lsp_setup call lsp#register_server({
\ 'name': 'vim-language-server',
- \ 'cmd': {server_info->[lsp_settings#exec_path('vim-language-server'), '--stdio']},
+ \ 'cmd': {server_info->lsp_settings#get('vim-language-server', 'cmd', [lsp_settings#exec_path('vim-language-server'), '--stdio'])},
\ 'initialization_options': {
\ 'vimruntime': $VIMRUNTIME,
\ 'runtimepath': &rtp,