mirror of
https://github.com/dense-analysis/ale.git
synced 2025-12-06 12:44:23 +08:00
Fix rust rls linter toolchain argument
This removes the argument if the specified toolchain is empty. As far as I can tell there is no +nighly (or similar) option [1] leading to the termination of the server. But since people needed this option and have yet to complain about it it stays the default for now. [1] https://github.com/rust-lang-nursery/rls/blob/master/src/main.rs#L87
This commit is contained in:
@@ -12,8 +12,11 @@ function! ale_linters#rust#rls#GetCommand(buffer) abort
|
||||
let l:executable = ale_linters#rust#rls#GetExecutable(a:buffer)
|
||||
let l:toolchain = ale#Var(a:buffer, 'rust_rls_toolchain')
|
||||
|
||||
return ale#Escape(l:executable)
|
||||
\ . ' +' . ale#Escape(l:toolchain)
|
||||
if empty(l:toolchain)
|
||||
return ale#Escape(l:executable)
|
||||
else
|
||||
return ale#Escape(l:executable) . ' +' . ale#Escape(l:toolchain)
|
||||
endif
|
||||
endfunction
|
||||
|
||||
function! ale_linters#rust#rls#GetLanguage(buffer) abort
|
||||
|
||||
Reference in New Issue
Block a user