Skip to content

Commit 1101e74

Browse files
bors[bot]weihanglo
andauthored
Merge #4098
4098: Add YouCompleteMe as a LSP option for vim/neovim r=matklad a=weihanglo As YouCompleteMe supports [arbitrary LSP implementation](https://ycm-core.github.io/YouCompleteMe/#plugging-an-arbitrary-lsp-server), it could be added to the list of vim LSP implementation. It works like a charm. Co-authored-by: Weihang Lo <weihanglo@users.noreply.github.com>
2 parents 8026a95 + 313409a commit 1101e74

File tree

1 file changed

+20
-0
lines changed

1 file changed

+20
-0
lines changed

docs/user/readme.adoc

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -177,6 +177,26 @@ let g:LanguageClient_serverCommands = {
177177
\ }
178178
----
179179

180+
==== YouCompleteMe
181+
182+
1. Install YouCompleteMe by following the instructions
183+
https://ycm-core.github.io/YouCompleteMe/#rust-semantic-completion[here]
184+
185+
2. Configure by adding this to your vim/neovim config file (replacing the existing Rust-specific line if it exists):
186+
+
187+
[source,vim]
188+
----
189+
let g:ycm_language_server =
190+
\ [
191+
\ {
192+
\ 'name': 'rust',
193+
\ 'cmdline': ['rust-analyzer'],
194+
\ 'filetypes': ['rust'],
195+
\ 'project_root_files': ['Cargo.toml']
196+
\ }
197+
\ ]
198+
----
199+
180200
==== nvim-lsp
181201

182202
NeoVim 0.5 (not yet released) has built-in language server support.

0 commit comments

Comments
 (0)