简体   繁体   中英

Vim syntastic error messages always hidden

Syntastic does not seem to work properly for me. It is installed, :SyntasticInfo says everything is fine (active mode enabled, filetype cpp, checker is ycm). At first glance everything seems to be fine because it looks like this:

1

I have my signs on the left and the location list at the bottom. But as soon as I move the cursor, the signs as well as the loc-list disappear and it looks like that:

2

The only exception to this rule being entering insert mode right at startup. But of course once I leave it, everything disappears.

Now I know that there are commands like :SyntasticCheck or :Errors and they do exactly... nothing. I type them, I execute them and that's it. Like I hadn't done anything at all. Naturally saving the file doesn't yield any result either.

My .vimrc looks like this:

let g:syntastic_enable_signs = 1
let g:syntastic_auto_loc_list=1
let g:syntastic_check_on_open = 1
let g:syntastic_cpp_compiler_options = ' -std=c++11 -Wall'

If I remove these lines I don't even have the signs and loc-list on startup. So yea, I am really at a loss here.

Turns out this was more of a YouCompleteMe problem than it was Syntastic. YCM automatically sets itself as the checker for syntastic (for compatible languages) and also requires a .ycm_extra_conf.py which should contain the compile flags for the ycm compiler. Without these flags it is not capable of compiling the code or detecting any errors.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM