diff options
author | w0rp <w0rp@users.noreply.github.com> | 2019-04-11 17:13:52 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-04-11 17:13:52 +0100 |
commit | d7395906ba0f9aca2fb1a6c32df236bfd4ab32f6 (patch) | |
tree | 501ee3ddb37ea984776fa5a2af7538fa1e825b7b | |
parent | 481316561445a4048a96a2c6bd41e9b623d8919f (diff) | |
parent | fb7099d44018f937566aff7c82e8b59d487f6be1 (diff) | |
download | ale-d7395906ba0f9aca2fb1a6c32df236bfd4ab32f6.zip |
Merge pull request #2432 from superobertking/master
Let rust rls linter find the default rust toolchain automatically
-rw-r--r-- | ale_linters/rust/rls.vim | 2 | ||||
-rw-r--r-- | doc/ale-rust.txt | 8 | ||||
-rw-r--r-- | test/command_callback/test_rust_rls_callbacks.vader | 2 |
3 files changed, 8 insertions, 4 deletions
diff --git a/ale_linters/rust/rls.vim b/ale_linters/rust/rls.vim index 0e5c326c..111d7558 100644 --- a/ale_linters/rust/rls.vim +++ b/ale_linters/rust/rls.vim @@ -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 diff --git a/doc/ale-rust.txt b/doc/ale-rust.txt index 3393b9c0..44a79b18 100644 --- a/doc/ale-rust.txt +++ b/doc/ale-rust.txt @@ -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. diff --git a/test/command_callback/test_rust_rls_callbacks.vader b/test/command_callback/test_rust_rls_callbacks.vader index ef4735d2..ec8c8811 100644 --- a/test/command_callback/test_rust_rls_callbacks.vader +++ b/test/command_callback/test_rust_rls_callbacks.vader @@ -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' |