mirror of
https://github.com/rust-lang/rust-analyzer
synced 2024-12-26 13:03:31 +00:00
Add YouCompleteMe as a LSP option for vim/neovim
This commit is contained in:
parent
8026a95a2a
commit
313409af9e
1 changed files with 20 additions and 0 deletions
|
@ -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
|
==== nvim-lsp
|
||||||
|
|
||||||
NeoVim 0.5 (not yet released) has built-in language server support.
|
NeoVim 0.5 (not yet released) has built-in language server support.
|
||||||
|
|
Loading…
Reference in a new issue