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

Telescope picker for links #343

Closed
Liquidmantis opened this issue Jan 24, 2024 · 5 comments · Fixed by #396
Closed

Telescope picker for links #343

Liquidmantis opened this issue Jan 24, 2024 · 5 comments · Fixed by #396
Labels

Comments

@Liquidmantis
Copy link

🚀 The feature, motivation and pitch

I'm hoping I just haven't been able to find the documentation, but it would be great if there was a Telescope picker for markdown links in a buffer. Having to move to a link to open it is slow in comparison.

Alternatives

No response

Additional context

No response

@epwalsh epwalsh added the contributions welcome Extra attention is needed label Jan 29, 2024
@epwalsh
Copy link
Owner

epwalsh commented Jan 29, 2024

@Liquidmantis that's an interesting idea! Would def be a nice feature, and not too hard to implement. I think we have most of the pieces implemented already, like a function for finding all references in a string of text.

@Liquidmantis
Copy link
Author

I haven't had much time but was starting to poke around to understand how it would be implemented to see if I could take a stab at it. I was thinking Treesitter would make it reasonably straightforward.

I currently use urlview, but it doesn't support markdown links. Here's an example of the experience with it, though.
CleanShot 2024-01-29 at 12 53 52@2x

@sotte
Copy link
Contributor

sotte commented Jan 30, 2024

I was just thinking about a "goto next link" and "goto previous link" mapping. A different way of solving a very similar issue.

Currently treesitter offers nodes for inline_links. Raw urls are not covered.

Here is an example:

image

Building something like a telescope picker for this should be reasonable straight forward.

@Liquidmantis
Copy link
Author

@epwalsh This is perfect! Thanks! Sorry I didn't contribute more.

@sotte
Copy link
Contributor

sotte commented Feb 13, 2024

This is a great little feature.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants