nvim: init.vim: Setup ghcid/hoogle based on environment
We may be running in a nix environment or without stack supported project. Check this and setup the environment variable for ghcid and hoogle plugin accordingly. Signed-off-by: Sanchayan Maity <maitysanchayan@gmail.com>
This commit is contained in:
parent
e2c94e87d6
commit
e951bb849f
1 changed files with 11 additions and 2 deletions
|
@ -513,8 +513,17 @@ let g:haskell_indent_in = 1
|
|||
let g:haskell_indent_guard = 2
|
||||
let g:haskell_indent_case_alternative = 1
|
||||
let g:cabal_indent_section = 2
|
||||
let g:ghcid_command = 'stack exec -- ghcid'
|
||||
let g:hoogle_search_bin = 'stack exec -- hoogle'
|
||||
" Either check empty($IN_NIX_SHELL) for nix specific or executable('ghcid')
|
||||
if executable('ghcid')
|
||||
let g:ghcid_command = 'ghcid'
|
||||
else
|
||||
let g:ghcid_command = 'stack exec -- ghcid'
|
||||
endif
|
||||
if executable('hoogle')
|
||||
let g:hoogle_search_bin = 'hoogle'
|
||||
else
|
||||
let g:hoogle_search_bin = 'stack exec -- hoogle'
|
||||
endif
|
||||
let g:hoogle_search_count = 30
|
||||
|
||||
" Use deoplete
|
||||
|
|
Loading…
Reference in a new issue