From de68f3a138d460f84dc80b92a331e88f94d12e7c Mon Sep 17 00:00:00 2001 From: Yasuhiro Matsumoto Date: Fri, 10 Jan 2020 00:23:48 +0900 Subject: Cosmetic changes --- plugin/lsp_settings.vim | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) (limited to 'plugin') diff --git a/plugin/lsp_settings.vim b/plugin/lsp_settings.vim index f8df1df..350c9ce 100644 --- a/plugin/lsp_settings.vim +++ b/plugin/lsp_settings.vim @@ -21,15 +21,11 @@ function! s:executable(cmd) abort if !has('win32') return !empty(globpath(l:paths, a:cmd)) endif - if !empty(globpath(l:paths, a:cmd . '.exe')) - return 1 - endif - if !empty(globpath(l:paths, a:cmd . '.cmd')) - return 1 - endif - if !empty(globpath(l:paths, a:cmd . '.bat')) - return 1 - endif + for l:ext in ['.exe', '.cmd', '.bat'] + if !empty(globpath(l:paths, a:cmd . l:ext)) + return 1 + endif + endfor return 0 endfunction -- cgit v1.2.3-54-g00ecf