mirror of
https://github.com/amix/vimrc
synced 2025-02-28 14:12:51 +08:00
13 lines
321 B
VimL
13 lines
321 B
VimL
function! ale#racket#FindProjectRoot(buffer) abort
|
|
let l:cwd = expand('#' . a:buffer . ':p:h')
|
|
let l:highest_init = l:cwd
|
|
|
|
for l:path in ale#path#Upwards(l:cwd)
|
|
if filereadable(l:path.'/init.rkt')
|
|
let l:highest_init = l:path
|
|
endif
|
|
endfor
|
|
|
|
return l:highest_init
|
|
endfunction
|