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: `{}`
@ -45,7 +45,7 @@ g:ale_r_lintr_lint_package *g:ale_r_lintr_lint_package*
Default: `0`
When set to `1`, the file will be checked with `lintr::lint_package` instead
of `lintr::lint`. This prevents erroneous namespace warnings when linting
of `lintr::lint`. This prevents erroneous namespace warnings when linting
package files.
@ -59,8 +59,8 @@ g:ale_r_styler_options *g:ale_r_styler_options*
This option can be configured to change the options for styler.
The value of this option will be used as the `style` argument for the
`styler::style_file` options. Consult the styler documentation
The value of this option will be used as the `style` argument for the
`styler::style_file` options. Consult the styler documentation
for more information.

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'}}}