aboutsummaryrefslogtreecommitdiff
path: root/plugin/lsp_settings.vim
diff options
context:
space:
mode:
authorthinca <thinca@gmail.com>2019-12-31 22:57:15 +0900
committerthinca <thinca@gmail.com>2019-12-31 23:17:26 +0900
commitfef383ee4daca1b856d7f001b6696bb210a1442c (patch)
treed81979018c0296bf8e320c24b9166a36438fd8c6 /plugin/lsp_settings.vim
parent319f7ad838e62a182ccff654c832d63733ed3719 (diff)
downloadvim-lsp-settings-fef383ee4daca1b856d7f001b6696bb210a1442c.tar.gz
vim-lsp-settings-fef383ee4daca1b856d7f001b6696bb210a1442c.tar.bz2
vim-lsp-settings-fef383ee4daca1b856d7f001b6696bb210a1442c.zip
Add g:lsp_settings_servers_dir option
Diffstat (limited to 'plugin/lsp_settings.vim')
-rw-r--r--plugin/lsp_settings.vim6
1 files changed, 4 insertions, 2 deletions
diff --git a/plugin/lsp_settings.vim b/plugin/lsp_settings.vim
index 23146a6..ea95bb9 100644
--- a/plugin/lsp_settings.vim
+++ b/plugin/lsp_settings.vim
@@ -16,7 +16,8 @@ function! s:executable(cmd) abort
if type(l:paths) == type([])
let l:paths = join(l:paths, ',')
endif
- let l:paths .= ',' . s:servers_dir . '/' . a:cmd
+ let l:servers_dir = get(g:, 'lsp_settings_servers_dir', s:servers_dir)
+ let l:paths .= ',' . l:servers_dir . '/' . a:cmd
if !has('win32')
return !empty(globpath(l:paths, a:cmd))
endif
@@ -97,7 +98,8 @@ endfunction
function! s:vimlsp_install_server() abort
let l:entry = s:vimlsp_installer()
- let l:server_install_dir = s:servers_dir . '/' . l:entry[0]
+ let l:servers_dir = get(g:, 'lsp_settings_servers_dir', s:servers_dir)
+ let l:server_install_dir = l:servers_dir . '/' . l:entry[0]
if isdirectory(l:server_install_dir)
call delete(l:server_install_dir, 'rf')
endif