Merge pull request #3453 from blinsay/blinsay/rust-analyzer-lsp

pass lsp intialization_options to rust-analyzer
This commit is contained in:
Horacio Sanson 2021-01-20 20:45:17 +09:00 committed by GitHub
commit 16c45b8213
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
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']}}