mirror of
https://github.com/dense-analysis/ale.git
synced 2025-12-10 06:21:53 +08:00
Merge pull request #3453 from blinsay/blinsay/rust-analyzer-lsp
pass lsp intialization_options to rust-analyzer
This commit is contained in:
@@ -17,7 +17,7 @@ endfunction
|
|||||||
call ale#linter#Define('rust', {
|
call ale#linter#Define('rust', {
|
||||||
\ 'name': 'analyzer',
|
\ 'name': 'analyzer',
|
||||||
\ 'lsp': 'stdio',
|
\ 'lsp': 'stdio',
|
||||||
\ 'lsp_config': {b -> ale#Var(b, 'rust_analyzer_config')},
|
\ 'initialization_options': {b -> ale#Var(b, 'rust_analyzer_config')},
|
||||||
\ 'executable': {b -> ale#Var(b, 'rust_analyzer_executable')},
|
\ 'executable': {b -> ale#Var(b, 'rust_analyzer_executable')},
|
||||||
\ 'command': function('ale_linters#rust#analyzer#GetCommand'),
|
\ 'command': function('ale_linters#rust#analyzer#GetCommand'),
|
||||||
\ 'project_root': function('ale_linters#rust#analyzer#GetProjectRoot'),
|
\ 'project_root': function('ale_linters#rust#analyzer#GetProjectRoot'),
|
||||||
|
|||||||
@@ -16,5 +16,5 @@ Execute(The project root should be detected correctly):
|
|||||||
|
|
||||||
Execute(Should accept configuration settings):
|
Execute(Should accept configuration settings):
|
||||||
AssertLSPConfig {}
|
AssertLSPConfig {}
|
||||||
let b:ale_rust_analyzer_config = {'rust': {'clippy_preference': 'on'}}
|
let b:ale_rust_analyzer_config = {'diagnostics': {'disabled': ['unresolved-import']}}
|
||||||
AssertLSPConfig {'rust': {'clippy_preference': 'on'}}
|
AssertLSPOptions {'diagnostics': {'disabled': ['unresolved-import']}}
|
||||||
|
|||||||
Reference in New Issue
Block a user