Skip to content

Commit 19c4a6b

Browse files
aniketdcocreature
authored andcommitted
Add configuration example for SpaceVim (#184)
...using its default configuration layers
1 parent 0f25910 commit 19c4a6b

File tree

1 file changed

+45
-0
lines changed

1 file changed

+45
-0
lines changed

README.md

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -182,6 +182,51 @@ Add this to your coc-settings.json (which you can edit with :CocConfig):
182182
Here's a nice article on setting up neovim and coc: [Vim and Haskell in
183183
2019](http://marco-lopes.com/articles/Vim-and-Haskell-in-2019/)
184184

185+
### SpaceVim
186+
187+
In the `autocomplete` layer, add the `autocomplete_method` option to force the use of `coc`:
188+
189+
```toml
190+
[[layers]]
191+
name = 'autocomplete'
192+
auto-completion-return-key-behavior = "complete"
193+
auto-completion-tab-key-behavior = "smart"
194+
[options]
195+
autocomplete_method = "coc"
196+
```
197+
198+
Add this to your coc-settings.json (which you can edit with :CocConfig):
199+
200+
```json
201+
{
202+
"languageserver": {
203+
"haskell": {
204+
"command": "stack",
205+
"args": [
206+
"exec",
207+
"ghcide",
208+
"--lsp"
209+
],
210+
"rootPatterns": [
211+
".stack.yaml",
212+
".hie-bios",
213+
"BUILD.bazel",
214+
"cabal.config",
215+
"package.yaml"
216+
],
217+
"filetypes": [
218+
"hs",
219+
"lhs",
220+
"haskell"
221+
]
222+
}
223+
}
224+
}
225+
```
226+
227+
This example above describes a setup in which `ghcide` is installed
228+
using `stack install ghcide` within a project.
229+
185230
## Hacking on ghcide
186231

187232
To build and work on `ghcide` itself, you can use Stack or cabal, e.g.,

0 commit comments

Comments
 (0)