summaryrefslogtreecommitdiff
path: root/autoload/ale/racket.vim
blob: ff896108830af8d1477c5f16bfb90fcc6cb2c647 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
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