Quick fix to “No .ycm_extra_conf.py file detected” problem in youcompleteme plugin in Vim

After you install the youcompleteme plugin in Vim, you possibly meet this problem:

No .ycm_extra_conf.py file detected ….

You may google it and find this quick solution: put an extra line in your .vimrc:

let g:ycm_global_ycm_extra_conf = '~/.vim/bundle/YouCompleteMe/cpp/ycm/.ycm_extra_conf.py’

However, this does not solve the problem as of Sept, 2017.

This is because the author changed the structure of the YCM folder. Add this to your .vimrc, and it solves the problem now
.
let g:ycm_global_ycm_extra_conf = '~/.vim/plugged/youcompleteme/third_party/ycmd/cpp/ycm/.ycm_extra_conf.py’

The best way is that read the very long manual to understand it totally.

Leave a comment