summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHoracio Sanson <hsanson@gmail.com>2021-01-20 20:45:17 +0900
committerGitHub <noreply@github.com>2021-01-20 20:45:17 +0900
commit16c45b82130c602c1542287d4509fc2809035e04 (patch)
treeabc1a9178ae74a458a5cd0fbdb416d5cdc3b8302
parent8de0e7b9ba43ed8b3d5697f2f0a14b0d3e399e68 (diff)
parentddfc43e774fd38e4051ba9fd3619ca9f0da6639f (diff)
downloadale-16c45b82130c602c1542287d4509fc2809035e04.zip
Merge pull request #3453 from blinsay/blinsay/rust-analyzer-lsp
pass lsp intialization_options to rust-analyzer
-rw-r--r--ale_linters/rust/analyzer.vim2
-rw-r--r--test/command_callback/test_rust_analyzer_callbacks.vader4
2 files changed, 3 insertions, 3 deletions
diff --git a/ale_linters/rust/analyzer.vim b/ale_linters/rust/analyzer.vim
index 3666ec03..77d946f7 100644
--- a/ale_linters/rust/analyzer.vim
+++ b/ale_linters/rust/analyzer.vim
@@ -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'),
diff --git a/test/command_callback/test_rust_analyzer_callbacks.vader b/test/command_callback/test_rust_analyzer_callbacks.vader
index 95866076..efab1378 100644
--- a/test/command_callback/test_rust_analyzer_callbacks.vader
+++ b/test/command_callback/test_rust_analyzer_callbacks.vader
@@ -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']}}