From 8ba7ae818c33c3b9ed9627ae9661f0420d256d7c Mon Sep 17 00:00:00 2001 From: w0rp Date: Tue, 5 Sep 2023 21:44:52 +0100 Subject: Close #4461 - Use rust-analyzer by default Use rust-analyzer by default instead of rls, as rls has been deprecated. --- autoload/ale/linter.vim | 2 +- doc/ale-rust.txt | 7 ++++--- doc/ale.txt | 2 +- test/test_filetype_linter_defaults.vader | 2 +- 4 files changed, 7 insertions(+), 6 deletions(-) diff --git a/autoload/ale/linter.vim b/autoload/ale/linter.vim index b5a32654..73c47109 100644 --- a/autoload/ale/linter.vim +++ b/autoload/ale/linter.vim @@ -53,7 +53,7 @@ let s:default_ale_linters = { \ 'perl': ['perlcritic'], \ 'perl6': [], \ 'python': ['flake8', 'mypy', 'pylint', 'pyright', 'ruff'], -\ 'rust': ['cargo', 'rls'], +\ 'rust': ['analyzer', 'cargo'], \ 'spec': [], \ 'text': [], \ 'vader': ['vimls'], diff --git a/doc/ale-rust.txt b/doc/ale-rust.txt index 48f558e8..897fcaa1 100644 --- a/doc/ale-rust.txt +++ b/doc/ale-rust.txt @@ -33,11 +33,12 @@ Integration Information 5. rustfmt -- If you have `rustfmt` installed, you can use it as a fixer to consistently reformat your Rust code. - Only cargo and rls are enabled by default. To switch to using rustc instead - of cargo, configure |g:ale_linters| appropriately: > + Only cargo and rust-analyze are enabled by default. To switch to using rustc + instead of cargo, configure |b:ale_linters| in your ftplugin file + appropriately: > " See the help text for the option for more information. - let g:ale_linters = {'rust': ['rustc', 'rls']} + let b:ale_linters = ['analyzer', 'rustc'] < Also note that rustc 1.18. or later is needed. diff --git a/doc/ale.txt b/doc/ale.txt index 9cec0fbe..5b411b58 100644 --- a/doc/ale.txt +++ b/doc/ale.txt @@ -1653,7 +1653,7 @@ g:ale_linters *g:ale_linters* \ 'perl': ['perlcritic'], \ 'perl6': [], \ 'python': ['flake8', 'mypy', 'pylint', 'pyright', 'ruff'], - \ 'rust': ['cargo', 'rls'], + \ 'rust': ['analyzer', 'cargo'], \ 'spec': [], \ 'text': [], \ 'vader': ['vimls'], diff --git a/test/test_filetype_linter_defaults.vader b/test/test_filetype_linter_defaults.vader index 6b56aca7..4de77bad 100644 --- a/test/test_filetype_linter_defaults.vader +++ b/test/test_filetype_linter_defaults.vader @@ -90,7 +90,7 @@ Execute(The defaults for the python filetype should be correct): AssertEqual [], GetLinterNames('python') Execute(The defaults for the rust filetype should be correct): - AssertEqual ['cargo', 'rls'], GetLinterNames('rust') + AssertEqual ['analyzer', 'cargo'], GetLinterNames('rust') let g:ale_linters_explicit = 1 -- cgit v1.2.3