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)
|
return s:first_one(l:path)
|
||||||
endif
|
endif
|
||||||
else
|
else
|
||||||
let l:path = globpath(l:paths, l:cmd . '.exe')
|
for l:ext in ['.exe', '.cmd', '.bat']
|
||||||
if !empty(l:path)
|
let l:path = globpath(l:paths, l:cmd . l:ext)
|
||||||
return s:first_one(l:path)
|
if !empty(l:path)
|
||||||
endif
|
return s:first_one(l:path)
|
||||||
let l:path = globpath(l:paths, l:cmd . '.cmd')
|
endif
|
||||||
if !empty(l:path)
|
endfor
|
||||||
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
|
|
||||||
endif
|
endif
|
||||||
|
|
||||||
let l:paths = get(g:, 'lsp_settings_extra_paths', '')
|
let l:paths = get(g:, 'lsp_settings_extra_paths', '')
|
||||||
@@ -70,18 +64,12 @@ function! lsp_settings#exec_path(cmd) abort
|
|||||||
if !has('win32')
|
if !has('win32')
|
||||||
return s:first_one(globpath(l:paths, l:cmd))
|
return s:first_one(globpath(l:paths, l:cmd))
|
||||||
endif
|
endif
|
||||||
let l:path = globpath(l:paths, l:cmd . '.exe')
|
for l:ext in ['.exe', '.cmd', '.bat']
|
||||||
if !empty(l:path)
|
let l:path = globpath(l:paths, l:cmd . l:ext)
|
||||||
return s:first_one(l:path)
|
if !empty(l:path)
|
||||||
endif
|
return s:first_one(l:path)
|
||||||
let l:path = globpath(l:paths, l:cmd . '.cmd')
|
endif
|
||||||
if !empty(l:path)
|
endfor
|
||||||
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
|
|
||||||
return ''
|
return ''
|
||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
|
|||||||
@@ -21,15 +21,11 @@ function! s:executable(cmd) abort
|
|||||||
if !has('win32')
|
if !has('win32')
|
||||||
return !empty(globpath(l:paths, a:cmd))
|
return !empty(globpath(l:paths, a:cmd))
|
||||||
endif
|
endif
|
||||||
if !empty(globpath(l:paths, a:cmd . '.exe'))
|
for l:ext in ['.exe', '.cmd', '.bat']
|
||||||
return 1
|
if !empty(globpath(l:paths, a:cmd . l:ext))
|
||||||
endif
|
return 1
|
||||||
if !empty(globpath(l:paths, a:cmd . '.cmd'))
|
endif
|
||||||
return 1
|
endfor
|
||||||
endif
|
|
||||||
if !empty(globpath(l:paths, a:cmd . '.bat'))
|
|
||||||
return 1
|
|
||||||
endif
|
|
||||||
return 0
|
return 0
|
||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user