aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYasuhiro Matsumoto <mattn.jp@gmail.com>2020-02-09 02:04:14 +0900
committerYasuhiro Matsumoto <mattn.jp@gmail.com>2020-02-09 02:04:14 +0900
commitbd09186d1bfeb70833f5455dd23de106ad6e1b1e (patch)
tree5157a20bb33a13f5a4be9e8e0337eb6c41fca801
parentcec57a8e79bab5c5e33ca0cc87228bca22c28035 (diff)
downloadvim-lsp-settings-bd09186d1bfeb70833f5455dd23de106ad6e1b1e.tar.gz
vim-lsp-settings-bd09186d1bfeb70833f5455dd23de106ad6e1b1e.tar.bz2
vim-lsp-settings-bd09186d1bfeb70833f5455dd23de106ad6e1b1e.zip
Set nosuf for globpath
-rw-r--r--autoload/lsp_settings.vim12
1 files changed, 6 insertions, 6 deletions
diff --git a/autoload/lsp_settings.vim b/autoload/lsp_settings.vim
index fcbcc98..3b78c66 100644
--- a/autoload/lsp_settings.vim
+++ b/autoload/lsp_settings.vim
@@ -27,11 +27,11 @@ 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)
+ let l:found = globpath(l:paths, a:cmd, 1)
return !empty(l:found)
endif
for l:ext in ['.exe', '.cmd', '.bat']
- if !empty(globpath(l:paths, a:cmd . l:ext))
+ if !empty(globpath(l:paths, a:cmd . l:ext, 1))
return 1
endif
endfor
@@ -122,14 +122,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, a:cmd)
+ let l:path = globpath(l:paths, a:cmd, 1)
if !has('win32')
if !empty(l:path)
return lsp_settings#utils#first_one(l:path)
endif
else
for l:ext in ['.exe', '.cmd', '.bat']
- let l:path = globpath(l:paths, a:cmd . l:ext)
+ let l:path = globpath(l:paths, a:cmd . l:ext, 1)
if !empty(l:path)
return lsp_settings#utils#first_one(l:path)
endif
@@ -142,10 +142,10 @@ function! lsp_settings#exec_path(cmd) abort
endif
let l:paths .= lsp_settings#servers_dir() . '/' . a:cmd
if !has('win32')
- return lsp_settings#utils#first_one(globpath(l:paths, a:cmd))
+ return lsp_settings#utils#first_one(globpath(l:paths, a:cmd, 1))
endif
for l:ext in ['.exe', '.cmd', '.bat']
- let l:path = globpath(l:paths, a:cmd . l:ext)
+ let l:path = globpath(l:paths, a:cmd . l:ext, 1)
if !empty(l:path)
return lsp_settings#utils#first_one(l:path)
endif