mirror of
https://github.com/dense-analysis/ale.git
synced 2025-12-06 12:44:23 +08:00
Merge pull request #2432 from superobertking/master
Let rust rls linter find the default rust toolchain automatically
This commit is contained in:
@@ -2,7 +2,7 @@
|
|||||||
" Description: A language server for Rust
|
" Description: A language server for Rust
|
||||||
|
|
||||||
call ale#Set('rust_rls_executable', 'rls')
|
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', {})
|
call ale#Set('rust_rls_config', {})
|
||||||
|
|
||||||
function! ale_linters#rust#rls#GetCommand(buffer) abort
|
function! ale_linters#rust#rls#GetCommand(buffer) abort
|
||||||
|
|||||||
@@ -164,10 +164,14 @@ g:ale_rust_rls_executable *g:ale_rust_rls_executable*
|
|||||||
g:ale_rust_rls_toolchain *g:ale_rust_rls_toolchain*
|
g:ale_rust_rls_toolchain *g:ale_rust_rls_toolchain*
|
||||||
*b:ale_rust_rls_toolchain*
|
*b:ale_rust_rls_toolchain*
|
||||||
Type: |String|
|
Type: |String|
|
||||||
Default: `'nightly'`
|
Default: `''`
|
||||||
|
|
||||||
This option can be set to change the toolchain used for `rls`. Possible
|
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.
|
The `rls` server will only be started once per executable.
|
||||||
|
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ After:
|
|||||||
call ale#assert#TearDownLinterTest()
|
call ale#assert#TearDownLinterTest()
|
||||||
|
|
||||||
Execute(The default executable path should be correct):
|
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):
|
Execute(The toolchain should be configurable):
|
||||||
let g:ale_rust_rls_toolchain = 'stable'
|
let g:ale_rust_rls_toolchain = 'stable'
|
||||||
|
|||||||
Reference in New Issue
Block a user