aboutsummaryrefslogtreecommitdiff
path: root/docs/user
diff options
context:
space:
mode:
authorHeyward Fann <[email protected]>2019-09-03 09:02:32 +0100
committerHeyward Fann <[email protected]>2019-09-03 09:02:32 +0100
commit31017d6dc466082573457009c346776fb01049fc (patch)
tree2f1dd741949cfc0dad9f0b0dcd58b24b6eb14df5 /docs/user
parent6c64f68d4a235e4ea7cc974711dcd181d10c55dc (diff)
feat(docs): add coc-rust-analyzer
Diffstat (limited to 'docs/user')
-rw-r--r--docs/user/README.md31
1 files changed, 4 insertions, 27 deletions
diff --git a/docs/user/README.md b/docs/user/README.md
index 453e8e273..00212a76f 100644
--- a/docs/user/README.md
+++ b/docs/user/README.md
@@ -104,35 +104,12 @@ to load path and require it in `init.el`
104 - Note that if you use a plugin manager other than `vim-plug`, you may need to manually 104 - Note that if you use a plugin manager other than `vim-plug`, you may need to manually
105 checkout the `release` branch wherever your plugin manager cloned it. Otherwise you will 105 checkout the `release` branch wherever your plugin manager cloned it. Otherwise you will
106 get errors about a missing javascript file. 106 get errors about a missing javascript file.
107* Add rust analyzer using: [coc.nvim wiki][coc-wiki] 107* Run `:CocInstall coc-rust-analyzer` to install `coc-rust-analyzer`, this extension already implemented _almost_ all features supported in VSCode extension:
108 - Use `:CocConfig` in command mode to edit the config file. 108 - same configurations as VSCode extension, `rust-analyzer.raLspServerPath`, `rust-analyzer.enableCargoWatchOnStartup` etc.
109 109 - same commands too, `rust-analyzer.analyzerStatus`, `rust-analyzer.startCargoWatch` etc.
110```jsonc 110 - highlighting and inlay_hints is not works by now
111 "languageserver": {
112 "rust": {
113 "command": "ra_lsp_server",
114 "filetypes": ["rust"],
115 "rootPatterns": ["Cargo.toml"]
116 }
117 }
118```
119
120For 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:
121
122```jsonc
123{
124 "languageserver": {
125 "rust": {
126 "command": "ra_lsp_server",
127 "filetypes": ["rust"],
128 "rootPatterns": ["Cargo.toml"]
129 }
130 }
131}
132```
133 111
134[coc.nvim]: https://github.com/neoclide/coc.nvim 112[coc.nvim]: https://github.com/neoclide/coc.nvim
135[coc-wiki]: https://github.com/neoclide/coc.nvim/wiki/Language-servers#rust
136[coc-vim-conf]: https://github.com/neoclide/coc.nvim/#example-vim-configuration 113[coc-vim-conf]: https://github.com/neoclide/coc.nvim/#example-vim-configuration
137 114
138 115