Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit e4506a4

Browse files
committed
ghc-mod root have to be executed in the buffer's directory
1 parent c526cd4 commit e4506a4

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

autoload/ghcmod.vim

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -293,7 +293,9 @@ function! s:find_basedir() "{{{
293293
" search Cabal file
294294
if !exists('b:ghcmod_basedir')
295295
" `ghc-mod root` is available since v4.0.0.
296+
lcd `=expand('%:p:h')`
296297
let b:ghcmod_basedir = substitute(vimproc#system(['ghc-mod', 'root']), '\n*$', '', '')
298+
lcd -
297299
endif
298300
return b:ghcmod_basedir
299301
endfunction "}}}

0 commit comments

Comments
 (0)