check executable

This commit is contained in:
Yasuhiro Matsumoto
2023-05-06 04:56:45 +09:00
parent f98467680e
commit af35b04c2d

View File

@@ -66,7 +66,7 @@ function! lsp_settings#executable(cmd) abort
endif
let l:paths .= ',' . lsp_settings#servers_dir() . '/' . a:cmd
if !has('win32')
let l:found = globpath(l:paths, a:cmd, 1)
let l:found = filter(split(globpath(l:paths, a:cmd, 1), "\n"), 'executable(v:val)')
return !empty(l:found)
endif
for l:ext in ['.exe', '.cmd', '.bat']