ale/ale_linters/ruby/solargraph.vim
w0rp d476578a40
Improve ALE project style checking
* The project style linter now runs while you type.
* Now the scripts for checking the project require blank lines.
* Many style issues have been found and fixed.
2018-09-04 16:51:18 +01:00

21 lines
675 B
VimL

" Author: Horacio Sanson - https://github.com/hsanson
" Description: Solargraph Language Server https://solargraph.org/
call ale#Set('ruby_solargraph_host', '127.0.0.1')
call ale#Set('ruby_solargraph_port', '7658')
function! ale_linters#ruby#solargraph#GetAddress(buffer) abort
let l:host = ale#Var(a:buffer, 'ruby_solargraph_host')
let l:port = ale#Var(a:buffer, 'ruby_solargraph_port')
return l:host . ':' . l:port
endfunction
call ale#linter#Define('ruby', {
\ 'name': 'solargraph',
\ 'lsp': 'socket',
\ 'address_callback': 'ale_linters#ruby#solargraph#GetAddress',
\ 'language': 'ruby',
\ 'project_root_callback': 'ale#ruby#FindProjectRoot'
\})