From 449562c8887f9e141b8ceb3bf4b3182a0c83e71c Mon Sep 17 00:00:00 2001 From: Yasuhiro Matsumoto Date: Mon, 16 Dec 2019 13:36:43 +0900 Subject: Fix exec_path --- autoload/lsp_settings.vim | 29 ++++++++++++++++------------- 1 file changed, 16 insertions(+), 13 deletions(-) (limited to 'autoload') 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', '') -- cgit v1.2.3-54-g00ecf