Quickfix list in vim when working with ninja and clang ++

I have a C ++ project that I am compiling with ninja and clang ++ and would like to have errors during compilation in the quickfix list. Currently, when I set makeprg=ninja and then run :make , all the output generated by ninja just appears in the quickfix window and cannot be used to go to the corresponding files / lines, etc.

I am NOT looking for syntastic functionality (which I already use), but I also want to see errors from other files in the project, similar to those provided by the IDE.

If it is impossible (easy) to do it with a ninja, solutions using make are also welcome (the project uses cmake, so both are possible), but I would like to stay with ninja if possible.

+7
c ++ vim clang ++ ninja
source share
1 answer

all the output generated by ninja just appears in the quickfix window and cannot be used to navigate

It seems that Vim cannot parse location information due to errors because the corresponding 'errorformat' not been set.

Search around, maybe someone already wrote this. Otherwise, you need to write your own compiler plugin, and then use :compiler ninja instead of :set makeprg=ninja . See :help write-compiler-plugin .

+2
source share

All Articles