aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--docs/user/manual.adoc35
1 files changed, 34 insertions, 1 deletions
diff --git a/docs/user/manual.adoc b/docs/user/manual.adoc
index 990b11859..10d4fd606 100644
--- a/docs/user/manual.adoc
+++ b/docs/user/manual.adoc
@@ -272,7 +272,40 @@ let g:ale_linters = {'rust': ['analyzer']}
272 272
273NeoVim 0.5 (not yet released) has built-in language server support. 273NeoVim 0.5 (not yet released) has built-in language server support.
274For a quick start configuration of rust-analyzer, use https://github.com/neovim/nvim-lspconfig#rust_analyzer[neovim/nvim-lspconfig]. 274For a quick start configuration of rust-analyzer, use https://github.com/neovim/nvim-lspconfig#rust_analyzer[neovim/nvim-lspconfig].
275Once `neovim/nvim-lspconfig` is installed, use `+lua require'nvim_lsp'.rust_analyzer.setup({})+` in your `init.vim`. 275Once `neovim/nvim-lspconfig` is installed, use `+lua require'lspconfig'.rust_analyzer.setup({})+` in your `init.vim`.
276
277You can also pass LSP settings to the server:
278
279[source,vim]
280----
281lua << EOF
282local nvim_lsp = require'lspconfig'
283
284local on_attach = function(client)
285 require'completion'.on_attach(client)
286end
287
288nvim_lsp.rust_analyzer.setup({
289 on_attach=on_attach,
290 settings = {
291 ["rust-analyzer"] = {
292 assist = {
293 importMergeBehavior = "last",
294 importPrefix = "by_self",
295 },
296 cargo = {
297 loadOutDirsFromCheck = true
298 },
299 procMacro = {
300 enable = true
301 },
302 }
303 }
304})
305EOF
306----
307
308See https://sharksforarms.dev/posts/neovim-rust/ for more tips on getting started.
276 309
277=== Sublime Text 3 310=== Sublime Text 3
278 311