File tree Expand file tree Collapse file tree 2 files changed +15
-1
lines changed Expand file tree Collapse file tree 2 files changed +15
-1
lines changed Original file line number Diff line number Diff line change @@ -403,7 +403,11 @@ function! s:system(...)"{{{
403
403
endfunction " }}}
404
404
405
405
function ! s: plineopen2 (... )" {{{
406
- lcd `= expand (' %:p:h' )`
406
+ if empty (g: ghcmod_use_basedir )
407
+ lcd `= expand (' %:p:h' )`
408
+ else
409
+ lcd `= g: ghcmod_use_basedir `
410
+ endif
407
411
let l: ret = call (' vimproc#plineopen2' , a: 000 )
408
412
lcd -
409
413
return l: ret
Original file line number Diff line number Diff line change @@ -102,6 +102,16 @@ g:ghcmod_type_highlight *g:ghcmod_type_highlight*
102
102
let ghcmodType ctermbg=yellow
103
103
let g:ghcmod_type_highlight = 'ghcmodType'
104
104
<
105
+ g:ghcmod_use_basedir *g:ghcmod_use_basedir*
106
+ The directory to execute ghc-mod from. This can have an effect
107
+ particularly on template Haskell splices that expect to find certain
108
+ files in certain places. A good practice in these cases is to make
109
+ them work from the projects base directory, and open Vim from there.
110
+ >
111
+ let g:ghcmod_use_basedir = getcwd()
112
+ <
113
+ If you do not set it, ghcmod will be executed from the folder the file
114
+ current Haskell file is contained in.
105
115
106
116
==============================================================================
107
117
CUSTOMIZE *ghcmod-customize*
You can’t perform that action at this time.
0 commit comments