Merge pull request #2432 from superobertking/master

Let rust rls linter find the default rust toolchain automatically
This commit is contained in:
w0rp 2019-04-11 17:13:52 +01:00 committed by GitHub
commit d7395906ba
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 8 additions and 4 deletions

View File

@ -2,7 +2,7 @@
" Description: A language server for Rust
call ale#Set('rust_rls_executable', 'rls')
call ale#Set('rust_rls_toolchain', 'nightly')
call ale#Set('rust_rls_toolchain', '')
call ale#Set('rust_rls_config', {})
function! ale_linters#rust#rls#GetCommand(buffer) abort

View File

@ -164,10 +164,14 @@ g:ale_rust_rls_executable *g:ale_rust_rls_executable*
g:ale_rust_rls_toolchain *g:ale_rust_rls_toolchain*
*b:ale_rust_rls_toolchain*
Type: |String|
Default: `'nightly'`
Default: `''`
This option can be set to change the toolchain used for `rls`. Possible
values include `'nightly'`, `'beta'`, and `'stable'`.
values include `'nightly'`, `'beta'`, `'stable'`, and `''`. When using
option `''`, rls will automatically find the default toolchain set by
rustup. If you want to use `rls` from a specific toolchain version, you may
also use values like `'channel-yyyy-mm-dd-arch-target'` as long as
`'rls +{toolchain_name} -V'` runs correctly in your command line.
The `rls` server will only be started once per executable.

View File

@ -5,7 +5,7 @@ After:
call ale#assert#TearDownLinterTest()
Execute(The default executable path should be correct):
AssertLinter 'rls', ale#Escape('rls') . ' +' . ale#Escape('nightly')
AssertLinter 'rls', ale#Escape('rls')
Execute(The toolchain should be configurable):
let g:ale_rust_rls_toolchain = 'stable'