summaryrefslogtreecommitdiff
path: root/ale_linters/ruby/solargraph.vim
blob: 2aad3af65e047cd5c5df19c9ba305253d6f04512 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
" 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'
\})