on master help sign in
Merge pull request #36 from digital-asset/vim_coc_instructions
f66c886Robin Krom
README.md+41
@@ -125,3 +125,44 @@ au User lsp_setup call lsp#register_server({
125```
125```
126
126
127To verify it works move your cursor over a symbol and run `:LspHover`.
127To 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/)