ale/ale_linters/ruby/solargraph.vim

21 lines
678 B
VimL
Raw Normal View History

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-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',
2018-09-18 10:33:22 -04:00
\ 'executable_callback': ale#VarFunc('ruby_solargraph_executable'),
\ 'command_callback': 'ale_linters#ruby#solargraph#GetCommand',
\ 'project_root_callback': 'ale#ruby#FindProjectRoot',
2018-08-24 00:02:51 -04:00
\})