mirror of
https://github.com/dense-analysis/ale.git
synced 2025-12-06 12:44:23 +08:00
Close #4541 - Fix Haskell project root detection
We weren't joining and returning paths correctly for detecting project roots for Haskell projects, and now we are. Co-authored-by: Rodrigo Mesquita <rodrigo.m.mesquita@gmail.com>
This commit is contained in:
@@ -16,8 +16,9 @@ function! ale_linters#haskell#hls#FindRootFile(buffer) abort
|
||||
|
||||
for l:path in ale#path#Upwards(expand('#' . a:buffer . ':p:h'))
|
||||
for l:root_file in l:serach_root_files
|
||||
if filereadable(l:path . l:root_file)
|
||||
return l:path
|
||||
if filereadable(l:path . '/' . l:root_file)
|
||||
" Add on / so fnamemodify(..., ':h') below keeps the path.
|
||||
return l:path . '/'
|
||||
endif
|
||||
endfor
|
||||
endfor
|
||||
|
||||
Reference in New Issue
Block a user