2018-08-24 00:02:51 -04:00
|
|
|
" Author: Horacio Sanson - https://github.com/hsanson
|
|
|
|
" Description: Solargraph Language Server https://solargraph.org/
|
2018-09-18 10:33:22 -04:00
|
|
|
"
|
|
|
|
" Author: Devon Meunier <devon.meunier@gmail.com>
|
|
|
|
" Description: updated to use stdio
|
2018-08-24 00:02:51 -04:00
|
|
|
|
2018-09-18 10:33:22 -04:00
|
|
|
call ale#Set('ruby_solargraph_executable', 'solargraph')
|
2018-10-12 06:16:28 -04:00
|
|
|
call ale#Set('ruby_solargraph_options', {})
|
2018-08-24 00:02:51 -04:00
|
|
|
|
2018-09-18 10:33:22 -04:00
|
|
|
function! ale_linters#ruby#solargraph#GetCommand(buffer) abort
|
|
|
|
return '%e' . ale#Pad('stdio')
|
2018-08-24 00:02:51 -04:00
|
|
|
endfunction
|
|
|
|
|
|
|
|
call ale#linter#Define('ruby', {
|
|
|
|
\ 'name': 'solargraph',
|
2018-09-18 10:33:22 -04:00
|
|
|
\ 'lsp': 'stdio',
|
2018-08-24 00:02:51 -04:00
|
|
|
\ 'language': 'ruby',
|
2019-02-22 13:05:04 -05:00
|
|
|
\ 'executable': {b -> ale#Var(b, 'ruby_solargraph_executable')},
|
|
|
|
\ 'command': function('ale_linters#ruby#solargraph#GetCommand'),
|
|
|
|
\ 'project_root': function('ale#ruby#FindProjectRoot'),
|
|
|
|
\ 'initialization_options': {b -> ale#Var(b, 'ruby_solargraph_options')},
|
2018-08-24 00:02:51 -04:00
|
|
|
\})
|