pass lsp intialization_options to rust-analyzer

fixes #3350
This commit is contained in:
Ben Linsay 2020-11-18 20:39:07 -05:00
parent 48fe0dd4f6
commit ddfc43e774
2 changed files with 3 additions and 3 deletions

View file

@ -17,7 +17,7 @@ endfunction
call ale#linter#Define('rust', {
\ 'name': 'analyzer',
\ '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')},
\ 'command': function('ale_linters#rust#analyzer#GetCommand'),
\ 'project_root': function('ale_linters#rust#analyzer#GetProjectRoot'),

View file

@ -16,5 +16,5 @@ Execute(The project root should be detected correctly):
Execute(Should accept configuration settings):
AssertLSPConfig {}
let b:ale_rust_analyzer_config = {'rust': {'clippy_preference': 'on'}}
AssertLSPConfig {'rust': {'clippy_preference': 'on'}}
let b:ale_rust_analyzer_config = {'diagnostics': {'disabled': ['unresolved-import']}}
AssertLSPOptions {'diagnostics': {'disabled': ['unresolved-import']}}