mirror of
https://github.com/dense-analysis/ale.git
synced 2025-12-08 05:24:46 +08:00
Add solargraph LSP linter.
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user