diff --git a/nvim/.config/nvim/init.vim b/nvim/.config/nvim/init.vim index ab0d2fe..7f0c4d4 100644 --- a/nvim/.config/nvim/init.vim +++ b/nvim/.config/nvim/init.vim @@ -394,6 +394,7 @@ augroup haskell_maps " https://github.com/maxigit/vimrc/tree/2020/compiler au FileType haskell compiler stack au FileType haskell setlocal makeprg=stack\ build + au FileType haskell setlocal keywordprg=:Hoogle au FileType haskell nmap b :Neomake! au FileType haskell nmap t :NeomakeSh stack exec -- hasktags -x -c . au FileType haskell nmap g :Ghcid @@ -498,7 +499,9 @@ augroup END augroup LSP au! - autocmd FileType haskell,rust,python :call SetLspKeybindings() + nnoremap cs :LanguageClientStart + nnoremap ch :LanguageClientStop + autocmd User LanguageClientStarted :call SetLspKeybindings() augroup END " --------------------------- Plugin settings -------------------------------- @@ -737,8 +740,6 @@ function! SetLspKeybindings() nnoremap K :call LanguageClient#textDocument_hover() nnoremap ge :call LanguageClient#explainErrorAtPoint() - nnoremap cs :LanguageClientStart - nnoremap ch :LanguageClientStop nnoremap cm :call LanguageClient_contextMenu() nnoremap td :call LanguageClient#textDocument_typeDefinition() nnoremap di :call LanguageClient#textDocument_implementation()