Skip to content

Commit bd62ee5

Browse files
committed
Fix #97: Invoke ghc-mod with --silent flag
This hides the warnings about if ghc-mod uses stack or cabal-install which otherwise confuses the Vim plugin parsing the output.
1 parent 815616e commit bd62ee5

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

autoload/ghcmod.vim

+2-2
Original file line numberDiff line numberDiff line change
@@ -245,7 +245,7 @@ function! ghcmod#add_autogen_dir(path, cmd) "{{{
245245
endfunction "}}}
246246

247247
function! ghcmod#build_command(args) "{{{
248-
let l:cmd = ['ghc-mod']
248+
let l:cmd = ['ghc-mod', '--silent']
249249

250250
let l:dist_top = s:find_basedir() . '/dist'
251251
let l:sandboxes = split(glob(l:dist_top . '/dist-*', 1), '\n')
@@ -341,7 +341,7 @@ function! s:find_basedir() "{{{
341341
try
342342
lcd `=expand('%:p:h')`
343343
let b:ghcmod_basedir =
344-
\ substitute(vimproc#system(['ghc-mod', 'root']), '\n*$', '', '')
344+
\ substitute(vimproc#system(['ghc-mod', '--silent', 'root']), '\n*$', '', '')
345345
finally
346346
lcd `=l:dir`
347347
endtry

0 commit comments

Comments
 (0)