[Feature Request] Call custom function when navigating the CocList
MahdiNazemi opened this issue · 6 comments
I use context.vim to show some context (class name, function name, loop information, etc.) at the top of the buffer. When using coc-references
and navigating the results opened in the lower split, the context on the upper split does not get updated.
To solve this issue, I assume I should call context#update('BufEnter')
(or one of the other triggers mentioned here) on the upper split where the actual file contents are shown. It would be nice to have some trigger I can use in an autocmd
to know a new item in the lower split is selected and call the said function in the upper split.
Ideally, this should work with j, k, arrow keys, CocNext
, and all other keys or mappings used to navigate the list.
The requested feature may exist already, but I was not able to find it.
Something like CocListMoved
autocmd is enough for this case?
Yes, it should be.
Yes, it should be.
Can you please refer to your autocmd? Mine will give an error.
Yes, it should be.
Can you please refer to your autocmd? Mine will give an error.
Can you please be more specific? What kind of error are you getting? I am currently on the release
branch, so I cannot test the newly added autocmd
trigger.
The release branch has been updated with this event.
The release branch has been updated with this event.
Thank you. I defined autocmd User CocListMoved * echom 'User CocListMoved'
, but do not see any :messages
after moving up and down on coc-references
results.