From 313409af9e230549406e30fe55c4153dadd9cfb2 Mon Sep 17 00:00:00 2001 From: Weihang Lo Date: Thu, 23 Apr 2020 17:09:37 +0800 Subject: [PATCH] Add YouCompleteMe as a LSP option for vim/neovim --- docs/user/readme.adoc | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/docs/user/readme.adoc b/docs/user/readme.adoc index 13ab2acc21f..ce570483666 100644 --- a/docs/user/readme.adoc +++ b/docs/user/readme.adoc @@ -177,6 +177,26 @@ let g:LanguageClient_serverCommands = { \ } ---- +==== YouCompleteMe + +1. Install YouCompleteMe by following the instructions + https://ycm-core.github.io/YouCompleteMe/#rust-semantic-completion[here] + +2. Configure by adding this to your vim/neovim config file (replacing the existing Rust-specific line if it exists): ++ +[source,vim] +---- +let g:ycm_language_server = +\ [ +\ { +\ 'name': 'rust', +\ 'cmdline': ['rust-analyzer'], +\ 'filetypes': ['rust'], +\ 'project_root_files': ['Cargo.toml'] +\ } +\ ] +---- + ==== nvim-lsp NeoVim 0.5 (not yet released) has built-in language server support.