Last active
December 23, 2015 09:09
-
-
Save yuga/6612105 to your computer and use it in GitHub Desktop.
Add support for cabal sandbox to syntastic. Write this in your .vimrc.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function! s:get_cabal_sandbox() | |
if filereadable('cabal.sandbox.config') | |
let l:output = system('cat cabal.sandbox.config | grep local-repo') | |
let l:dir = matchstr(substitute(l:output, '\n', ' ', 'g'), 'local-repo: \zs\S\+\ze\/packages') | |
return '-s ' . l:dir | |
else | |
return '' | |
endif | |
endfunction | |
let g:syntastic_haskell_ghc_mod_args = s:get_cabal_sandbox() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment