More details on how to set up coc

This commit is contained in:
Who? Me?! 2019-06-18 09:25:59 -05:00 committed by GitHub
parent 1541b2d689
commit 857f3e546c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

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": {
@ -104,8 +110,23 @@ to load path and require it in `init.el`
}
```
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