diff options
author | wordi <wordijp@gmail.com> | 2020-01-11 14:05:59 +0900 |
---|---|---|
committer | wordi <wordijp@gmail.com> | 2020-01-11 14:05:59 +0900 |
commit | a533201f8cd20c7b0170c2c90de9e99b0bb1dcb1 (patch) | |
tree | 0c4d7bfdf92d9889f2aff1980c858508f6278689 /autoload | |
parent | 0c44be4f85d0455138a860f63f0af37da340135a (diff) | |
download | vim-lsp-settings-a533201f8cd20c7b0170c2c90de9e99b0bb1dcb1.tar.gz vim-lsp-settings-a533201f8cd20c7b0170c2c90de9e99b0bb1dcb1.tar.bz2 vim-lsp-settings-a533201f8cd20c7b0170c2c90de9e99b0bb1dcb1.zip |
Cleanup unused code
No longer used in PR(#83)
Diffstat (limited to 'autoload')
-rw-r--r-- | autoload/lsp_settings.vim | 14 |
1 files changed, 5 insertions, 9 deletions
diff --git a/autoload/lsp_settings.vim b/autoload/lsp_settings.vim index 6d4c28d..e710d9a 100644 --- a/autoload/lsp_settings.vim +++ b/autoload/lsp_settings.vim @@ -24,10 +24,6 @@ function! s:first_one(cmd) abort endfunction function! lsp_settings#exec_path(cmd) abort - let l:s = split(a:cmd, ':') - let l:dir = len(l:s) >= 1 ? l:s[0] : '' - let l:cmd = len(l:s) >= 2 ? l:s[1] : l:s[0] - let l:paths = [] if has('win32') for l:path in split($PATH, ';') @@ -41,14 +37,14 @@ function! lsp_settings#exec_path(cmd) abort let l:paths = split($PATH, ':') endif let l:paths = join(l:paths, ',') - let l:path = globpath(l:paths, l:cmd) + let l:path = globpath(l:paths, a:cmd) if !has('win32') if !empty(l:path) return s:first_one(l:path) endif else for l:ext in ['.exe', '.cmd', '.bat'] - let l:path = globpath(l:paths, l:cmd . l:ext) + let l:path = globpath(l:paths, a:cmd . l:ext) if !empty(l:path) return s:first_one(l:path) endif @@ -60,12 +56,12 @@ function! lsp_settings#exec_path(cmd) abort let l:paths = join(l:paths, ',') . ',' endif let l:servers_dir = get(g:, 'lsp_settings_servers_dir', s:servers_dir) - let l:paths .= l:servers_dir . '/' . l:dir + let l:paths .= l:servers_dir . '/' . a:cmd if !has('win32') - return s:first_one(globpath(l:paths, l:cmd)) + return s:first_one(globpath(l:paths, a:cmd)) endif for l:ext in ['.exe', '.cmd', '.bat'] - let l:path = globpath(l:paths, l:cmd . l:ext) + let l:path = globpath(l:paths, a:cmd . l:ext) if !empty(l:path) return s:first_one(l:path) endif |