Expose ruby-solargraph initialization options
This commit is contained in:
parent
e5b5ce9f51
commit
12409fa73d
@ -5,6 +5,7 @@
|
|||||||
" Description: updated to use stdio
|
" Description: updated to use stdio
|
||||||
|
|
||||||
call ale#Set('ruby_solargraph_executable', 'solargraph')
|
call ale#Set('ruby_solargraph_executable', 'solargraph')
|
||||||
|
call ale#Set('ruby_solargraph_init_options', {})
|
||||||
|
|
||||||
function! ale_linters#ruby#solargraph#GetCommand(buffer) abort
|
function! ale_linters#ruby#solargraph#GetCommand(buffer) abort
|
||||||
return '%e' . ale#Pad('stdio')
|
return '%e' . ale#Pad('stdio')
|
||||||
@ -17,4 +18,5 @@ call ale#linter#Define('ruby', {
|
|||||||
\ 'executable_callback': ale#VarFunc('ruby_solargraph_executable'),
|
\ 'executable_callback': ale#VarFunc('ruby_solargraph_executable'),
|
||||||
\ 'command_callback': 'ale_linters#ruby#solargraph#GetCommand',
|
\ 'command_callback': 'ale_linters#ruby#solargraph#GetCommand',
|
||||||
\ 'project_root_callback': 'ale#ruby#FindProjectRoot',
|
\ 'project_root_callback': 'ale#ruby#FindProjectRoot',
|
||||||
|
\ 'initialization_options_callback': ale#VarFunc('ruby_solargraph_init_options'),
|
||||||
\})
|
\})
|
||||||
|
@ -37,3 +37,8 @@ Execute(should set solargraph for ruby app3):
|
|||||||
AssertLSPLanguage 'ruby'
|
AssertLSPLanguage 'ruby'
|
||||||
AssertLSPOptions {}
|
AssertLSPOptions {}
|
||||||
AssertLSPProject ale#path#Simplify(g:dir . 'command_callback/../ruby_fixtures/valid_ruby_app3')
|
AssertLSPProject ale#path#Simplify(g:dir . 'command_callback/../ruby_fixtures/valid_ruby_app3')
|
||||||
|
|
||||||
|
Execute(should accept initialization options):
|
||||||
|
AssertLSPOptions {}
|
||||||
|
let b:ale_ruby_solargraph_init_options = { 'diagnostics': 'true' }
|
||||||
|
AssertLSPOptions { 'diagnostics': 'true' }
|
||||||
|
Loading…
Reference in New Issue
Block a user