Skip to content

Commit 3589042

Browse files
author
Robin Krom
committed
Added setup instructions for vim/coc to README
Instructions to setup https://github.com/neoclide/coc.nvim and neovim together with ghcide.
1 parent 1760ef1 commit 3589042

File tree

1 file changed

+41
-0
lines changed

1 file changed

+41
-0
lines changed

README.md

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -125,3 +125,44 @@ au User lsp_setup call lsp#register_server({
125125
```
126126

127127
To verify it works move your cursor over a symbol and run `:LspHover`.
128+
129+
### coc.nvim
130+
131+
Install [coc.nvim](https://github.com/neoclide/coc.nvim)
132+
133+
Add this to your coc-settings.json (which you can edit with :CocConfig):
134+
135+
```json
136+
{
137+
"languageserver": {
138+
"haskell": {
139+
"command": "ghcide",
140+
"args": [
141+
"--lsp"
142+
],
143+
"rootPatterns": [
144+
".stack.yaml",
145+
".hie-bios",
146+
"BUILD.bazel",
147+
"cabal.config",
148+
"package.yaml"
149+
],
150+
"filetypes": [
151+
"hs",
152+
"lhs",
153+
"haskell"
154+
],
155+
"initializationOptions": {
156+
"languageServerHaskell": {
157+
"hlintOn": true,
158+
"maxNumberOfProblems": 10,
159+
"completionSnippetsOn": true
160+
}
161+
}
162+
}
163+
}
164+
}
165+
```
166+
167+
Here's a nice article on setting up neovim and coc: [Vim and Haskell in
168+
2019](http://marco-lopes.com/articles/Vim-and-Haskell-in-2019/)

0 commit comments

Comments
 (0)