nvim: init.vim: Add Hoogle & Hspec support

While at it also goodie shortcuts for Ghcid and hoogle.
This commit is contained in:
Sanchayan Maity 2019-11-04 11:29:31 +05:30 committed by Sanchayan Maity
parent 3bdc90b523
commit fb0671128e

View file

@ -53,6 +53,8 @@ Plug 'Olical/vim-scheme', { 'for': 'scheme', 'on': 'SchemeConnect' }
Plug 'ekmett/haskell-vim', { 'for': [ 'haskell', 'cabal' ] }
Plug 'neomake/neomake'
Plug 'ndmitchell/ghcid', { 'rtp': 'plugins/nvim' }
Plug 'Twinside/vim-hoogle'
Plug 'hspec/hspec.vim'
" For Nix
Plug 'LnL7/vim-nix', { 'for': 'nix' }
" For autocompletion
@ -197,6 +199,15 @@ nnoremap <Leader>nj :NeomakeListJobs<CR>
nnoremap <Leader>nca :NeomakeCancelJobs<CR>
nnoremap <Leader>ncj :NeomakeCancelJob
" Haskell specific
" For ghcid
nnoremap <Leader>hg :Ghcid<CR>
nnoremap <Leader>hk :GhcidKill<CR>
" For Hoogle
nnoremap <Leader>hc :HoogleClose<CR>
nnoremap <Leader>ho :exe ':Hoogle ' . expand('<cword>')<CR>
nnoremap <Leader>hi :exe ':HoogleInfo ' . expand('<cword>')<CR>
" Quickfix
nnoremap <Leader>fn :cnext<CR>
nnoremap <Leader>fp :cprevious<CR>
@ -270,6 +281,7 @@ 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'
" Use deoplete
let g:deoplete#enable_at_startup = 1