Skip to content

Commit

Permalink
Add instructions for hls with coc vim
Browse files Browse the repository at this point in the history
  • Loading branch information
HugoPeters1024 committed Oct 16, 2020
1 parent 331687d commit 2f2f8c2
Showing 1 changed file with 20 additions and 1 deletion.
21 changes: 20 additions & 1 deletion Guide/editors.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand All @@ -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`.
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`.

0 comments on commit 2f2f8c2

Please sign in to comment.