Use _config for LSP config options

This commit is contained in:
w0rp 2020-11-21 20:58:34 +00:00
parent 9692c0c64c
commit 681a6e371d
No known key found for this signature in database
GPG Key ID: 0FC1ECAA8C81CD83
3 changed files with 8 additions and 8 deletions

View File

@ -2,7 +2,7 @@
" Description: Implementation of the Language Server Protocol for R.
call ale#Set('r_languageserver_cmd', 'languageserver::run()')
call ale#Set('r_languageserver_options', {})
call ale#Set('r_languageserver_config', {})
function! ale_linters#r#languageserver#GetCommand(buffer) abort
let l:cmd_string = ale#Var(a:buffer, 'r_languageserver_cmd')
@ -19,7 +19,7 @@ endfunction
call ale#linter#Define('r', {
\ 'name': 'languageserver',
\ 'lsp': 'stdio',
\ 'lsp_config': {b -> ale#Var(b, 'r_languageserver_options')},
\ 'lsp_config': {b -> ale#Var(b, 'r_languageserver_config')},
\ 'executable': 'Rscript',
\ 'command': function('ale_linters#r#languageserver#GetCommand'),
\ 'project_root': function('ale_linters#r#languageserver#GetProjectRoot')

View File

@ -16,8 +16,8 @@ g:ale_r_languageserver_cmd *g:ale_r_languageserver_cmd*
See the languageserver documentation for more options.
g:ale_r_languageserver_options *g:ale_r_languageserver_options*
*b:ale_r_languageserver_options*
g:ale_r_languageserver_config *g:ale_r_languageserver_config*
*b:ale_r_languageserver_config*
Type: |Dictionary|
Default: `{}`

View File

@ -17,6 +17,6 @@ Execute(The project root should be detected correctly):
Execute(Should accept configuration settings):
AssertLSPConfig {}
let b:ale_r_languageserver_options = {'r': {'lsp': {'debug': 'true', 'diagnostics': 'true'}}}
let b:ale_r_languageserver_config = {'r': {'lsp': {'debug': 'true', 'diagnostics': 'true'}}}
AssertLSPConfig {'r': {'lsp': {'debug': 'true', 'diagnostics': 'true'}}}