Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add autocmd-event for setloclist/setqflist #13099

Open
weilbith opened this issue Oct 16, 2020 · 1 comment
Open

add autocmd-event for setloclist/setqflist #13099

weilbith opened this issue Oct 16, 2020 · 1 comment
Labels
enhancement feature request events events, autocommands

Comments

@weilbith
Copy link
Contributor

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 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!

@weilbith weilbith added the enhancement feature request label Oct 16, 2020
@zeertzjq zeertzjq added the events events, autocommands label Dec 31, 2021
@emmanueltouzery
Copy link

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 justinmk changed the title Discussion to add autocmd-event for setloclist/setqflist add autocmd-event for setloclist/setqflist Apr 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement feature request events events, autocommands
Projects
None yet
Development

No branches or pull requests

3 participants