From 5b2a5d0c277490de465bcc932fa1ed851656ec71 Mon Sep 17 00:00:00 2001 From: Yasuhiro Matsumoto Date: Thu, 23 Jan 2020 16:17:53 +0900 Subject: Fix checking executables --- plugin/lsp_settings.vim | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'plugin') diff --git a/plugin/lsp_settings.vim b/plugin/lsp_settings.vim index 07cc35d..f729453 100644 --- a/plugin/lsp_settings.vim +++ b/plugin/lsp_settings.vim @@ -20,7 +20,8 @@ function! s:executable(cmd) abort let l:servers_dir = get(g:, 'lsp_settings_servers_dir', s:servers_dir) let l:paths .= ',' . l:servers_dir . '/' . a:cmd if !has('win32') - return !empty(globpath(l:paths, a:cmd)) + let l:found = globpath(l:paths, a:cmd) + return !empty(l:found) && executable(l:found) endif for l:ext in ['.exe', '.cmd', '.bat'] if !empty(globpath(l:paths, a:cmd . l:ext)) -- cgit v1.2.3-54-g00ecf