ale/ale_linters/ruby/solargraph.vim

23 lines
797 B
VimL
Raw Normal View History

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')
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',
\ '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
\})