aboutsummaryrefslogtreecommitdiff
path: root/autoload
diff options
context:
space:
mode:
authorYasuhiro Matsumoto <mattn.jp@gmail.com>2019-12-16 13:36:43 +0900
committerYasuhiro Matsumoto <mattn.jp@gmail.com>2019-12-16 13:36:43 +0900
commit449562c8887f9e141b8ceb3bf4b3182a0c83e71c (patch)
treecdd2caa7c372d3f1557258a7e2d19ca78305e896 /autoload
parent51817ee86b0fb62c820d1caba8a62a3192c1ff3b (diff)
downloadvim-lsp-settings-449562c8887f9e141b8ceb3bf4b3182a0c83e71c.tar.gz
vim-lsp-settings-449562c8887f9e141b8ceb3bf4b3182a0c83e71c.tar.bz2
vim-lsp-settings-449562c8887f9e141b8ceb3bf4b3182a0c83e71c.zip
Fix exec_path
Diffstat (limited to 'autoload')
-rw-r--r--autoload/lsp_settings.vim29
1 files changed, 16 insertions, 13 deletions
diff --git a/autoload/lsp_settings.vim b/autoload/lsp_settings.vim
index 80c8ceb..d409070 100644
--- a/autoload/lsp_settings.vim
+++ b/autoload/lsp_settings.vim
@@ -28,19 +28,22 @@ function! lsp_settings#exec_path(cmd) abort
let l:paths = join(l:paths, ',')
let l:path = globpath(l:paths, a:cmd)
if !has('win32')
- return s:first_one(globpath(l:paths, a:cmd))
- endif
- let l:path = globpath(l:paths, a:cmd . '.exe')
- if !empty(l:path)
- return s:first_one(l:path)
- endif
- let l:path = globpath(l:paths, a:cmd . '.cmd')
- if !empty(l:path)
- return s:first_one(l:path)
- endif
- let l:path = globpath(l:paths, a:cmd . '.bat')
- if !empty(l:path)
- return s:first_one(l:path)
+ if !empty(l:path)
+ return s:first_one(l:path)
+ endif
+ else
+ let l:path = globpath(l:paths, a:cmd . '.exe')
+ if !empty(l:path)
+ return s:first_one(l:path)
+ endif
+ let l:path = globpath(l:paths, a:cmd . '.cmd')
+ if !empty(l:path)
+ return s:first_one(l:path)
+ endif
+ let l:path = globpath(l:paths, a:cmd . '.bat')
+ if !empty(l:path)
+ return s:first_one(l:path)
+ endif
endif
let l:paths = get(g:, 'lsp_settings_extra_paths', '')