Add YouCompleteMe.md

Fangrui Song 2019-11-02 13:40:53 -07:00
parent d56219e28d
commit 8cd3189413
2 changed files with 29 additions and 0 deletions

28
YouCompleteMe.md Normal file

@ -0,0 +1,28 @@
Install [YouCompleteMe](https://github.com/ycm-core/YouCompleteMe)
```sh
cd ~/.vim/bundle/YouCompleteMe
./install.py # --clang-completer is not needed
```
## Configure
```vim
let g:ycm_language_server =
\ [{
\ 'name': 'ccls',
\ 'cmdline': [ 'ccls' ],
\ 'filetypes': [ 'c', 'cpp', 'cuda', 'objc', 'objcpp' ],
\ 'project_root_files': [ '.ccls-root', 'compile_commands.json' ]
\ }]
```
## Cross references
```vim
:YcmCompleter GoToDefinition
:YcmCompleter GoToDeclaration
:YcmCompleter GoToReferences
:YcmCompleter GoToImplementation
:YcmCompleter GoToType
```

@ -13,6 +13,7 @@
+ [[LanguageClient-neovim]]
+ [[vim-lsp]]
+ [[vim-lsc]]
+ [[YouCompleteMe]]
- [[Visual Studio Code]]
- [[Monaco Editor | https://github.com/MaskRay/ccls/wiki/Monaco-Editor]]
* [[Project Setup]]