I have a C++ project which I compile using ninja and clang++, and would like to have errors during compilation appear in the quickfix list. Currently, when I set makeprg=ninja
, and then run :make
, all of the output generated by ninja simply appears in the quickfix window, and cannot be used to jump to the corresponding files/lines etc.
I am NOT looking for the functionality given by syntastic (which I am already using), but I also want to see errors from other files in the project, similar to what IDEs provide.
If this cannot (easily) be done with 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.
all of the output generated by ninja simply appears in the quickfix window, and cannot be used to jump
That sounds like Vim cannot parse the location information out of the errors because the appropriate 'errorformat'
hasn't been set.
Search around, maybe someone has already written such. Otherwise, you need to write your own compiler plugin, and then use :compiler ninja
instead of :set makeprg=ninja
. See :help write-compiler-plugin
.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With