From a533201f8cd20c7b0170c2c90de9e99b0bb1dcb1 Mon Sep 17 00:00:00 2001 From: wordi Date: Sat, 11 Jan 2020 14:05:59 +0900 Subject: Cleanup unused code No longer used in PR(#83) --- autoload/lsp_settings.vim | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) (limited to 'autoload') 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 -- cgit v1.2.3-54-g00ecf