mirror of
https://github.com/mattn/vim-lsp-settings.git
synced 2025-12-12 20:35:54 +01:00
Cosmetic changes
This commit is contained in:
@@ -47,18 +47,12 @@ function! lsp_settings#exec_path(cmd) abort
|
||||
return s:first_one(l:path)
|
||||
endif
|
||||
else
|
||||
let l:path = globpath(l:paths, l:cmd . '.exe')
|
||||
if !empty(l:path)
|
||||
return s:first_one(l:path)
|
||||
endif
|
||||
let l:path = globpath(l:paths, l:cmd . '.cmd')
|
||||
if !empty(l:path)
|
||||
return s:first_one(l:path)
|
||||
endif
|
||||
let l:path = globpath(l:paths, l:cmd . '.bat')
|
||||
if !empty(l:path)
|
||||
return s:first_one(l:path)
|
||||
endif
|
||||
for l:ext in ['.exe', '.cmd', '.bat']
|
||||
let l:path = globpath(l:paths, l:cmd . l:ext)
|
||||
if !empty(l:path)
|
||||
return s:first_one(l:path)
|
||||
endif
|
||||
endfor
|
||||
endif
|
||||
|
||||
let l:paths = get(g:, 'lsp_settings_extra_paths', '')
|
||||
@@ -70,18 +64,12 @@ function! lsp_settings#exec_path(cmd) abort
|
||||
if !has('win32')
|
||||
return s:first_one(globpath(l:paths, l:cmd))
|
||||
endif
|
||||
let l:path = globpath(l:paths, l:cmd . '.exe')
|
||||
if !empty(l:path)
|
||||
return s:first_one(l:path)
|
||||
endif
|
||||
let l:path = globpath(l:paths, l:cmd . '.cmd')
|
||||
if !empty(l:path)
|
||||
return s:first_one(l:path)
|
||||
endif
|
||||
let l:path = globpath(l:paths, l:cmd . '.bat')
|
||||
if !empty(l:path)
|
||||
return s:first_one(l:path)
|
||||
endif
|
||||
for l:ext in ['.exe', '.cmd', '.bat']
|
||||
let l:path = globpath(l:paths, l:cmd . l:ext)
|
||||
if !empty(l:path)
|
||||
return s:first_one(l:path)
|
||||
endif
|
||||
endfor
|
||||
return ''
|
||||
endfunction
|
||||
|
||||
|
||||
@@ -21,15 +21,11 @@ function! s:executable(cmd) abort
|
||||
if !has('win32')
|
||||
return !empty(globpath(l:paths, a:cmd))
|
||||
endif
|
||||
if !empty(globpath(l:paths, a:cmd . '.exe'))
|
||||
return 1
|
||||
endif
|
||||
if !empty(globpath(l:paths, a:cmd . '.cmd'))
|
||||
return 1
|
||||
endif
|
||||
if !empty(globpath(l:paths, a:cmd . '.bat'))
|
||||
return 1
|
||||
endif
|
||||
for l:ext in ['.exe', '.cmd', '.bat']
|
||||
if !empty(globpath(l:paths, a:cmd . l:ext))
|
||||
return 1
|
||||
endif
|
||||
endfor
|
||||
return 0
|
||||
endfunction
|
||||
|
||||
|
||||
Reference in New Issue
Block a user