From 6c93cded648f835a23ca5b5a1ed4bfefb81c7fd2 Mon Sep 17 00:00:00 2001 From: eyenseo Date: Thu, 12 Apr 2018 20:42:38 +0200 Subject: 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 --- ale_linters/rust/rls.vim | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'ale_linters/rust/rls.vim') diff --git a/ale_linters/rust/rls.vim b/ale_linters/rust/rls.vim index 832fe3e2..24316b04 100644 --- a/ale_linters/rust/rls.vim +++ b/ale_linters/rust/rls.vim @@ -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 -- cgit v1.2.3