CC++编程YouCompleteMe报错:RuntimeError: No completions found; errors in the file?

tech2026-03-14  4

Vimplus自带YouCompleteMe插件,在正确安装Vimplus后,使用C语言编程的过程中频繁报错:

RuntimeError: No completions found; errors in the file?

去看了YouCompleteMe的官方文档后,发现Vimplus是在不支持C系列语言的情况下编译YCM的,根据指引需要编译YCM 与通过C家族语言的语义支持 clangd

如果是安装通过YouCompleteMe官方文档的方式进行的,则遵循如下文档指引即可

cd ~/.vim/bundle/YouCompleteMe python3 install.py --clangd-completer

Vimplus将YouCompleteMe等所有插件安装在了.vim/plugged,应按以下操作

cd ~/.vim/plugged/YouCompleteMe python3 install.py --clangd-completer

重新编译后,C编程就没有报错了

最新回复(0)