Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion autoload/ghcmod.vim
Original file line number Diff line number Diff line change
Expand Up @@ -403,7 +403,11 @@ function! s:system(...)"{{{
endfunction"}}}

function! s:plineopen2(...)"{{{
lcd `=expand('%:p:h')`
if empty(g:ghcmod_use_basedir)
lcd `=expand('%:p:h')`
else
lcd `=g:ghcmod_use_basedir`
endif
let l:ret = call('vimproc#plineopen2', a:000)
lcd -
return l:ret
Expand Down
10 changes: 10 additions & 0 deletions doc/ghcmod.txt
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,16 @@ g:ghcmod_type_highlight *g:ghcmod_type_highlight*
let ghcmodType ctermbg=yellow
let g:ghcmod_type_highlight = 'ghcmodType'
<
g:ghcmod_use_basedir *g:ghcmod_use_basedir*
The directory to execute ghc-mod from. This can have an effect
particularly on template Haskell splices that expect to find certain
files in certain places. A good practice in these cases is to make
them work from the projects base directory, and open Vim from there.
>
let g:ghcmod_use_basedir = getcwd()
<
If you do not set it, ghcmod will be executed from the folder the file
current Haskell file is contained in.

==============================================================================
CUSTOMIZE *ghcmod-customize*
Expand Down