mirror of
https://github.com/dense-analysis/ale.git
synced 2025-12-07 05:04:28 +08:00
#3324 - Enable rls by default
This commit is contained in:
@@ -32,7 +32,7 @@ let s:default_ale_linter_aliases = {
|
|||||||
"
|
"
|
||||||
" No linters are used for plaintext files by default.
|
" No linters are used for plaintext files by default.
|
||||||
"
|
"
|
||||||
" Only cargo is enabled for Rust by default.
|
" Only cargo and rls are enabled for Rust by default.
|
||||||
" rpmlint is disabled by default because it can result in code execution.
|
" rpmlint is disabled by default because it can result in code execution.
|
||||||
" hhast is disabled by default because it executes code in the project root.
|
" hhast is disabled by default because it executes code in the project root.
|
||||||
"
|
"
|
||||||
@@ -46,7 +46,7 @@ let s:default_ale_linters = {
|
|||||||
\ 'perl': ['perlcritic'],
|
\ 'perl': ['perlcritic'],
|
||||||
\ 'perl6': [],
|
\ 'perl6': [],
|
||||||
\ 'python': ['flake8', 'mypy', 'pylint', 'pyright'],
|
\ 'python': ['flake8', 'mypy', 'pylint', 'pyright'],
|
||||||
\ 'rust': ['cargo'],
|
\ 'rust': ['cargo', 'rls'],
|
||||||
\ 'spec': [],
|
\ 'spec': [],
|
||||||
\ 'text': [],
|
\ 'text': [],
|
||||||
\ 'vue': ['eslint', 'vls'],
|
\ 'vue': ['eslint', 'vls'],
|
||||||
|
|||||||
@@ -31,11 +31,11 @@ Integration Information
|
|||||||
5. rustfmt -- If you have `rustfmt` installed, you can use it as a fixer to
|
5. rustfmt -- If you have `rustfmt` installed, you can use it as a fixer to
|
||||||
consistently reformat your Rust code.
|
consistently reformat your Rust code.
|
||||||
|
|
||||||
Only cargo is enabled by default. To switch to using rustc instead of cargo,
|
Only cargo and rls are enabled by default. To switch to using rustc instead
|
||||||
configure |g:ale_linters| appropriately: >
|
of cargo, configure |g:ale_linters| appropriately: >
|
||||||
|
|
||||||
" See the help text for the option for more information.
|
" See the help text for the option for more information.
|
||||||
let g:ale_linters = {'rust': ['rustc']}
|
let g:ale_linters = {'rust': ['rustc', 'rls']}
|
||||||
<
|
<
|
||||||
|
|
||||||
Also note that rustc 1.12. or later is needed.
|
Also note that rustc 1.12. or later is needed.
|
||||||
@@ -60,6 +60,7 @@ g:ale_rust_analyzer_config *g:ale_rust_analyzer_config*
|
|||||||
|
|
||||||
Dictionary with configuration settings for rust-analyzer.
|
Dictionary with configuration settings for rust-analyzer.
|
||||||
|
|
||||||
|
|
||||||
===============================================================================
|
===============================================================================
|
||||||
cargo *ale-rust-cargo*
|
cargo *ale-rust-cargo*
|
||||||
|
|
||||||
@@ -252,14 +253,15 @@ g:ale_rust_ignore_error_codes *g:ale_rust_ignore_error_codes*
|
|||||||
>
|
>
|
||||||
let g:ale_rust_ignore_error_codes = ['E0432', 'E0433']
|
let g:ale_rust_ignore_error_codes = ['E0432', 'E0433']
|
||||||
|
|
||||||
|
|
||||||
g:ale_rust_ignore_secondary_spans *g:ale_rust_ignore_secondary_spans*
|
g:ale_rust_ignore_secondary_spans *g:ale_rust_ignore_secondary_spans*
|
||||||
*b:ale_rust_ignore_secondary_spans*
|
*b:ale_rust_ignore_secondary_spans*
|
||||||
Type: Number
|
Type: Number
|
||||||
Default: 0
|
Default: 0
|
||||||
|
|
||||||
When set to 1, instructs the Rust error repporting to ignore secondary
|
When set to 1, instructs the Rust error reporting to ignore secondary spans.
|
||||||
spans. The problem with secondary spans is that they sometimes appear in
|
The problem with secondary spans is that they sometimes appear in error
|
||||||
error messages before the main cause of the error, for example: >
|
messages before the main cause of the error, for example: >
|
||||||
|
|
||||||
1 src/main.rs|98 col 5 error| this function takes 4 parameters but 5
|
1 src/main.rs|98 col 5 error| this function takes 4 parameters but 5
|
||||||
parameters were supplied: defined here
|
parameters were supplied: defined here
|
||||||
@@ -269,6 +271,7 @@ g:ale_rust_ignore_secondary_spans *g:ale_rust_ignore_secondary_spans*
|
|||||||
This is due to the sorting by line numbers. With this option set to 1,
|
This is due to the sorting by line numbers. With this option set to 1,
|
||||||
the 'defined here' span will not be presented.
|
the 'defined here' span will not be presented.
|
||||||
|
|
||||||
|
|
||||||
===============================================================================
|
===============================================================================
|
||||||
rustfmt *ale-rust-rustfmt*
|
rustfmt *ale-rust-rustfmt*
|
||||||
|
|
||||||
|
|||||||
@@ -1441,7 +1441,7 @@ g:ale_linters *g:ale_linters*
|
|||||||
\ 'perl': ['perlcritic'],
|
\ 'perl': ['perlcritic'],
|
||||||
\ 'perl6': [],
|
\ 'perl6': [],
|
||||||
\ 'python': ['flake8', 'mypy', 'pylint', 'pyright'],
|
\ 'python': ['flake8', 'mypy', 'pylint', 'pyright'],
|
||||||
\ 'rust': ['cargo'],
|
\ 'rust': ['cargo', 'rls'],
|
||||||
\ 'spec': [],
|
\ 'spec': [],
|
||||||
\ 'text': [],
|
\ 'text': [],
|
||||||
\ 'vue': ['eslint', 'vls'],
|
\ 'vue': ['eslint', 'vls'],
|
||||||
|
|||||||
@@ -39,7 +39,7 @@ Execute(The defaults for the python filetype should be correct):
|
|||||||
AssertEqual [], GetLinterNames('python')
|
AssertEqual [], GetLinterNames('python')
|
||||||
|
|
||||||
Execute(The defaults for the rust filetype should be correct):
|
Execute(The defaults for the rust filetype should be correct):
|
||||||
AssertEqual ['cargo'], GetLinterNames('rust')
|
AssertEqual ['cargo', 'rls'], GetLinterNames('rust')
|
||||||
|
|
||||||
let g:ale_linters_explicit = 1
|
let g:ale_linters_explicit = 1
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user