chxuan / vimplus

:rocket:An automatic configuration program for vim
https://github.com/chxuan/vimplus
MIT License
3.9k stars 1.13k forks source link

头文件报错:Maximum number of diagnostics exceeded. #287

Closed zebrajiahao closed 4 years ago

zebrajiahao commented 4 years ago

打开项目,在ycm添加头文件,还会有个#号报错,查看是Maximum number of diagnostics exceeded. 请问是什么造成的,如何解决?

chxuan commented 4 years ago

@zebrajiahao 你好,编译ycm有没有报错呢?你的系统是什么?

zebrajiahao commented 4 years ago

@zebrajiahao 你好,编译ycm有没有报错呢?你的系统是什么?

你好,我直接在ubuntu18.04上按照脚本安装的,没有报错信息,一般错误显示文件开头位置。

Screenshot from 2020-08-04 13-44-42

zebrajiahao commented 4 years ago

是因为诊断的问题太多了么,该工程使用10多个第三方库,头文件要都添加在.ycm_extra_conf.py中?

zebrajiahao commented 4 years ago

This means that ycmd found more than 30 diagnostics when parsing the translation unit. This limit is configurable through the max_diagnostics_to_display option (a value of 0 means no limit).

需要在.vimrc中 ycm对应位置添加 g:ycm_max_diagnostics_to_display = 0 这个配置。