This repository has been archived on 2024-07-19. You can view files and clone it, but cannot push or open issues or pull requests.
ale/test/command_callback/test_rust_rls_callbacks.vader
Nathan Henrie e5746d9a83 Add lsp_config support for rls (#2332)
* Add lsp_config for rls
* Add working config example and test
2019-03-05 09:09:29 +00:00

30 lines
923 B
Text

Before:
call ale#assert#SetUpLinterTest('rust', 'rls')
After:
call ale#assert#TearDownLinterTest()
Execute(The default executable path should be correct):
AssertLinter 'rls', ale#Escape('rls') . ' +' . ale#Escape('nightly')
Execute(The toolchain should be configurable):
let g:ale_rust_rls_toolchain = 'stable'
AssertLinter 'rls', ale#Escape('rls') . ' +' . ale#Escape('stable')
Execute(The toolchain should be ommitted if not given):
let g:ale_rust_rls_toolchain = ''
AssertLinter 'rls', ale#Escape('rls')
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_rls_config = {'rust': {'clippy_preference': 'on'}}
AssertLSPConfig {'rust': {'clippy_preference': 'on'}}