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