1413: More details on how to set up coc r=matklad a=mark-i-m

I spent ~1 hour trying to figure this out. It's all pretty simple stuff, but very annoying...

Co-authored-by: Who? Me?! <mark-i-m@users.noreply.github.com>
This commit is contained in:
bors[bot] 2019-06-18 14:33:24 +00:00
commit f7da575a98

View file

@ -92,7 +92,13 @@ to load path and require it in `init.el`
## Vim and NeoVim
* Install coc.nvim by following the instructions at [coc.nvim]
- You will need nodejs installed.
- You may want to include some of the sample vim configurations [from here][coc-vim-conf]
- Note that if you use a plugin manager other than `vim-plug`, you may need to manually
checkout the `release` branch wherever your plugin manager cloned it. Otherwise you will
get errors about a missing javascript file.
* Add rust analyzer using: [coc.nvim wiki][coc-wiki]
- Use `:CocConfig` in command mode to edit the config file.
```jsonc
"languageserver": {
@ -101,11 +107,26 @@ to load path and require it in `init.el`
"filetypes": ["rust"],
"rootPatterns": ["Cargo.toml"]
}
}
```
For those not familiar with js, the whole file should be enclosed in `{` and `}`, with all of your config options in between. So for example, if rust-analyzer was your only language server, you could do the following:
```jsonc
{
"languageserver": {
"rust": {
"command": "ra_lsp_server",
"filetypes": ["rust"],
"rootPatterns": ["Cargo.toml"]
}
}
}
```
[coc.nvim]: https://github.com/neoclide/coc.nvim
[coc-wiki]: https://github.com/neoclide/coc.nvim/wiki/Language-servers#rust
[coc-vim-conf]: https://github.com/neoclide/coc.nvim/#example-vim-configuration
## Sublime Text 3