Filter vim's quickfix window per file

423 Views Asked by At

I'm using the cquery language server in my Neovim instance. In conjunction with the Languageclient-neovim plugin. This automatically also checks the code for errors in the file that I'm working. However, this also means it checks all the files in my workspace.

I was wondering if there was a possibility to only show errors that are specific to the file that I am working in. See the example below:

Example

I'm working in the file src/bag_rotation.cpp and I only want to filter the quickfix window to only show errors from that file.

3

There are 3 best solutions below

3
On BEST ANSWER

yes, I wrote a vim plugin, can do ":Keep" and ":Reject" on quickfix window (among other things).

https://github.com/romainl/vim-qf

You can just give the suitable pattern to do your filtering.

0
On

yes, I wrote a vim plugin, can do "grep" on quickfix window.

https://github.com/sk1418/QFGrep

You can just give the suitable pattern to do your filtering.

0
On

yes, I wrote a vim plugin gist, can do :Cfilter and :Cfilter! (invert search)

https://gist.github.com/PeterRincker/33345cf7fdeb9038611e4a338a0067f3

You can just give the suitable pattern to do your filtering.

:Cfilter /foo/