1. 进入vim插件文件夹里面的YCM目录中: cd ~/.vim/plugged/YouCompleteMe/third_party/ycmd/cpp
  2. cmake -DCMAKE_EXPORT_COMPILE_COMMANDS=ON .
  3. make
  4. make build
  5. make install