c++ - How can I make YouCompleteMe highlight errors and warnings? -


this .vimrc:

set nocompatible filetype off  set rtp+=~/.vim/bundle/vundle.vim call vundle#begin() plugin 'gmarik/vundle.vim' plugin 'scrooloose/nerdtree' plugin 'valloric/youcompleteme' plugin 'jnurmine/zenburn' plugin 'ldx/vim-indentfinder' call vundle#end()  filetype plugin indent on colors zenburn  set encoding=utf-8 set tabstop=4 set softtabstop=4 set shiftwidth=4 set smarttab set number  let g:ycm_always_populate_location_list = 1 

now, trying use in c++ project. thing compilation errors not highlighted inside editor. know .ycm_extra_conf.py , configured, because if run:

:ycmforcecompileanddiagnostics 

and then, in line know wrong:

:ycmshowdetaileddiagnostic 

i expected error message:

/home/lvella/src/project/src/main.cpp:56:2: error: unknown type name 'safdsadfsadf' 

but not highlighted. inspecting :ycmdiags, can see 30 warning messages originated inside external library using. suspect error list filled 30 entries, leaving ones in code out of it. right? can filter out entries not present in file looking at? can increase number of entries listed? how see errors?

as turned out, matter of reading manual:

the g:ycm_max_diagnostics_to_display option

this option controls maximum number of diagnostics shown user when errors or warnings detected in file. option relevant if using c-family semantic completion engine.

default: 30

let g:ycm_max_diagnostics_to_display = 30

i set option 1000 , see error messages.


Comments