Add lsp_config support for rls (#2332)

* Add lsp_config for rls
* Add working config example and test
This commit is contained in:
Nathan Henrie
2019-03-05 02:09:29 -07:00
committed by w0rp
parent c4328f2a31
commit e5746d9a83
3 changed files with 21 additions and 0 deletions
+2
View File
@@ -3,6 +3,7 @@
call ale#Set('rust_rls_executable', 'rls')
call ale#Set('rust_rls_toolchain', 'nightly')
call ale#Set('rust_rls_config', {})
function! ale_linters#rust#rls#GetCommand(buffer) abort
let l:toolchain = ale#Var(a:buffer, 'rust_rls_toolchain')
@@ -19,6 +20,7 @@ endfunction
call ale#linter#Define('rust', {
\ 'name': 'rls',
\ 'lsp': 'stdio',
\ 'lsp_config': {b -> ale#Var(b, 'rust_rls_config')},
\ 'executable': {b -> ale#Var(b, 'rust_rls_executable')},
\ 'command': function('ale_linters#rust#rls#GetCommand'),
\ 'project_root': function('ale_linters#rust#rls#GetProjectRoot'),