You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
There is only an event emitted before and after a command as run that Vim considers to be relevant for the quickfix or location list (e.g. :grep). But the lists can be set by basically everyone, causing no event the user could listen to.
Expected behaviour
An event gets thrown when ever setqflist or setloclist got called.
Sorry if this was already discussed once. I was not able to find such conversation.
I know there should not be an event for every rare use-case. But in fact this event(s) do already exist, just that they do not apply not for everything. Why emitting an event for specific commands only rather than make it more generic?
To finally make an example where this could be useful would be a status segment that highlights if and how much location lists entry exist. So there is no need to automatically open the location list (if such feature is provided), but the user can have a visual feedback if any asynchronous tool is adding location or quickfix list entries.
Thanks for any input!
The text was updated successfully, but these errors were encountered:
another example of a use-case is the https://github.com/dhruvasagar/vim-markify plugin, which displays signs for quickfix locations and uses QuickFixCmdPost to listen to quickfix changes, but that even is not triggered for manual setqflist changes.
justinmk
changed the title
Discussion to add autocmd-event for setloclist/setqflist
add autocmd-event for setloclist/setqflist
Apr 7, 2024
Actual behaviour
There is only an event emitted before and after a command as run that Vim considers to be relevant for the quickfix or location list (e.g.
:grep
). But the lists can be set by basically everyone, causing no event the user could listen to.Expected behaviour
An event gets thrown when ever
setqflist
orsetloclist
got called.Sorry if this was already discussed once. I was not able to find such conversation.
I know there should not be an event for every rare use-case. But in fact this event(s) do already exist, just that they do not apply not for everything. Why emitting an event for specific commands only rather than make it more generic?
To finally make an example where this could be useful would be a status segment that highlights if and how much location lists entry exist. So there is no need to automatically open the location list (if such feature is provided), but the user can have a visual feedback if any asynchronous tool is adding location or quickfix list entries.
Thanks for any input!
The text was updated successfully, but these errors were encountered: