Add support for rust-analyzer

Fixes #2832
This commit is contained in:
Jon Gjengset
2019-10-16 11:34:06 -04:00
parent 7c5825ecbc
commit f5c289dce6
5 changed files with 70 additions and 0 deletions

View File

@@ -0,0 +1,20 @@
Before:
call ale#assert#SetUpLinterTest('rust', 'analyzer')
After:
call ale#assert#TearDownLinterTest()
Execute(The default executable path should be correct):
AssertLinter 'analyzer', ale#Escape('ra_lsp_server')
Execute(The project root should be detected correctly):
AssertLSPProject ''
call ale#test#SetFilename('rust-rls-project/test.rs')
AssertLSPProject ale#path#Simplify(g:dir . '/rust-rls-project')
Execute(Should accept configuration settings):
AssertLSPConfig {}
let b:ale_rust_analyzer_config = {'rust': {'clippy_preference': 'on'}}
AssertLSPConfig {'rust': {'clippy_preference': 'on'}}