- I assume you use a Linux system like I do for your everyday tasks, not one of those bloated operating systems which name starts with a M or a W (it's my blog, so I'm allowed to give my personal preferences here).
- First of all, I needed to enable YouCompleteMe otherwise, it just doesn't work at all:
let g:ycm_use_clangd="Never" " required because Vundle didn't install it set runtimepath+=~/.vim/bundle/YouCompleteMe " required to make YCM works let g:ycm_global_ycm_extra_conf='~/.ycm_extra_conf.py'
- Then, I've changed colors a bit to make things not to harsh on my eyes and especially to solve the problem that errors in the source code are not readable anymore when highlighted by YouCompleteMe
" Colors " the left column (gutter/sign column) has the same color as the background highlight clear SignColumn " underline only the error (default was not good) highlight YcmErrorSection cterm=underline " sign was too red flashy highlight YcmErrorSign cterm=bold,reverse
And that's it. But don't forget to make a compilation database in your project's directory too. I use CMake these days and all you have to do is to add the following line in your CMakeLists.txt file:
set(CMAKE_EXPORT_COMPILE_COMMANDS ON)It will create a file called compile_commands.json in your project directory that YouCompleteMe will use to find the proper compilation parameters to analyse your code. It's useful when you use 3rd party libraries for example.