Add solargraph LSP linter.

This commit is contained in:
Horacio Sanson
2018-08-24 13:02:51 +09:00
parent 3c85c7ef65
commit 1980245b94
12 changed files with 105 additions and 2 deletions

View File

@@ -20,3 +20,25 @@ function! ale#ruby#FindRailsRoot(buffer) abort
return ''
endfunction
" Find the nearest dir containing a potential ruby project.
function! ale#ruby#FindProjectRoot(buffer) abort
let l:dir = ale#ruby#FindRailsRoot(a:buffer)
if isdirectory(l:dir)
return l:dir
endif
for l:name in ['Rakefile', 'Gemfile']
let l:dir = fnamemodify(
\ ale#path#FindNearestFile(a:buffer, l:name),
\ ':h'
\)
if l:dir isnot# '.' && isdirectory(l:dir)
return l:dir
endif
endfor
return ''
endfunction