mirror of https://github.com/dense-analysis/ale
Use _config for LSP config options
This commit is contained in:
parent
9692c0c64c
commit
681a6e371d
|
@ -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')
|
||||
|
|
|
@ -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.
|
||||
|
||||
|
||||
|
|
|
@ -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'}}}
|
||||
|
|
Loading…
Reference in New Issue