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
Recently there has been a really significant quality-of-life functionality with the help of @micangl which is the development of the cmp-vimtex plugin, which allows for fuzzy finding of latex references like citations and equations. For me, this has been absolutely essential, so I am eager to see how the plugin develops (and also considerations of direct implementation into vimtex evolves).
I am wondering if it is possible to develop a Telescope-like plugin where you can fuzzy find on labels, but allowing you to preview where the label of such a reference appears.
For example, suppose that my equation is referenced via \label{eq:bigresult}. I would like to press shortcut, pop up a Telescope window, then type 'big' and immediately get a preview of the text where the relevant label appears. Alternatively I can scroll through possible entries and select whichever one is appropriate.
ghe closest currently available feature would be the table of contents, which can give functionality close to what you are asking for. You can create custom table of contents, e.g. one that only shows the labels.
E.g., if you add this to your after/ftplugin/tex.vim file:
Now you can use \ly to open a dedicated toc with only labels. It does not give the preview feature, though, and it is not quite the same as the Telescope selector (you could say it is far from it).
This is about 100 lines of code, much of which is not so relevant (theres a lot of formatting and stuff). Now, I don't really need this feature myself, and I'm not an expert at writing Telescope sources. I would not mind helping, but I would be glad if someone else took lead on writing the Telescope picker. If someone did, I would be glad to consider and help out with a PR.
Recently there has been a really significant quality-of-life functionality with the help of @micangl which is the development of the cmp-vimtex plugin, which allows for fuzzy finding of latex references like citations and equations. For me, this has been absolutely essential, so I am eager to see how the plugin develops (and also considerations of direct implementation into vimtex evolves).
I am wondering if it is possible to develop a Telescope-like plugin where you can fuzzy find on labels, but allowing you to preview where the label of such a reference appears.
For example, suppose that my equation is referenced via \label{eq:bigresult}. I would like to press shortcut, pop up a Telescope window, then type 'big' and immediately get a preview of the text where the relevant label appears. Alternatively I can scroll through possible entries and select whichever one is appropriate.
The text was updated successfully, but these errors were encountered: