From 2f2f8c28850096a035a91af4934175a2631d3cbb Mon Sep 17 00:00:00 2001 From: HugoPeters1024 Date: Fri, 16 Oct 2020 20:40:24 +0200 Subject: [PATCH] Add instructions for hls with coc vim --- Guide/editors.markdown | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) diff --git a/Guide/editors.markdown b/Guide/editors.markdown index 361ae4804..ad9073978 100644 --- a/Guide/editors.markdown +++ b/Guide/editors.markdown @@ -45,6 +45,25 @@ and put a `.dir-locals.el` file in your project root with: (haskell-process-type . ghci))) ``` +## Using IHP with Vim / NeoVim + +### Using CoC + +Provided you already have CoC setup, just run `:CocConfig` and add the following segment. + +```json +{ + "languageserver": { + "haskell": { + "command": "haskell-language-server-wrapper", + "args": ["--lsp"], + "rootPatterns": ["*.cabal", "stack.yaml", "cabal.project", "package.yaml", "hie.yaml"], + "filetypes": ["haskell", "lhaskell"] + } + } +} +``` + ## Notes on `haskell-language-server` IHP currently uses v0.4 of haskell language server. @@ -62,4 +81,4 @@ In line 21 and 22 it should be configured like this: nixPkgsSha256 = "0p2z6jidm4rlp2yjfl553q234swj1vxl8z0z8ra1hm61lfrlcmb9"; ``` -In case you have a different `nixPkgsRev` or `nixPkgsSha256` replace it with the above code. After that run `make -B .envrc` and `make hie.yaml`. \ No newline at end of file +In case you have a different `nixPkgsRev` or `nixPkgsSha256` replace it with the above code. After that run `make -B .envrc` and `make hie.yaml`.