mirror of
https://github.com/dense-analysis/ale.git
synced 2026-01-09 04:52:29 +08:00
* rust-analyzer in non-cargo projects rust-analyzer can also be used in non-cargo projects. This requires a rust-project.json file in the project root [1]. Make the rust-analyzer linter search for a rust-project.json file if no Cargo.toml file could be found. [1]: https://rust-analyzer.github.io/manual.html#non-cargo-based-projects * Document rust-analyzer without cargo * Test rust-analyzer with non-cargo projects Change the other rust tests to match the new directory structure of the test files.
31 lines
912 B
Plaintext
31 lines
912 B
Plaintext
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')
|
|
|
|
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('../test-files/rust/cargo/testfile.rs')
|
|
|
|
AssertLSPProject ale#path#Simplify(g:dir . '/../test-files/rust/cargo')
|
|
|
|
Execute(Should accept configuration settings):
|
|
AssertLSPConfig {}
|
|
let b:ale_rust_rls_config = {'rust': {'clippy_preference': 'on'}}
|
|
AssertLSPConfig {'rust': {'clippy_preference': 'on'}}
|