summaryrefslogtreecommitdiff
path: root/autoload
diff options
context:
space:
mode:
authorw0rp <devw0rp@gmail.com>2018-07-05 21:48:47 +0100
committerw0rp <devw0rp@gmail.com>2018-07-05 21:48:47 +0100
commitd5b4f6f7e72747cdfaac9fb17c9d473ffe5b3249 (patch)
tree6ea7e390a3352ab2d1a53805a02d58861c113bd4 /autoload
parentda692b2e2dd9bc81047449b8811ab2672004b8bc (diff)
downloadale-d5b4f6f7e72747cdfaac9fb17c9d473ffe5b3249.zip
Fix command formatting for LSP linters
Diffstat (limited to 'autoload')
-rw-r--r--autoload/ale/lsp_linter.vim8
1 files changed, 3 insertions, 5 deletions
diff --git a/autoload/ale/lsp_linter.vim b/autoload/ale/lsp_linter.vim
index 4527c74e..31299fc5 100644
--- a/autoload/ale/lsp_linter.vim
+++ b/autoload/ale/lsp_linter.vim
@@ -147,16 +147,14 @@ function! ale#lsp_linter#StartLSP(buffer, linter, callback) abort
else
let l:executable = ale#linter#GetExecutable(a:buffer, a:linter)
- if !executable(l:executable)
+ if empty(l:executable) || !executable(l:executable)
return {}
endif
+ let l:command = ale#linter#GetCommand(a:buffer, a:linter)
" Format the command, so %e can be formatted into it.
let l:command = ale#command#FormatCommand(a:buffer, l:executable, l:command, 0)[1]
- let l:command = ale#job#PrepareCommand(
- \ a:buffer,
- \ ale#linter#GetCommand(a:buffer, a:linter),
- \)
+ let l:command = ale#job#PrepareCommand(a:buffer, l:command)
let l:conn_id = ale#lsp#StartProgram(
\ l:executable,
\ l:command,