diff --git a/YouCompleteMe.md b/YouCompleteMe.md new file mode 100644 index 0000000..8230f17 --- /dev/null +++ b/YouCompleteMe.md @@ -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 +``` diff --git a/_Sidebar.md b/_Sidebar.md index 68af54e..ada2d92 100644 --- a/_Sidebar.md +++ b/_Sidebar.md @@ -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]]