gx.nvim icon indicating copy to clipboard operation
gx.nvim copied to clipboard

Support for Mac Deep links

Open lcfd opened this issue 1 year ago • 4 comments
trafficstars

Hi, I have a use case that I can't find in the documentation or in the issues:

Support for Mac Deep links like message:%3C....%3E.

Have you in program to support them?

I'm trying the plugin, and it works like a charm for all the rest 💚. Thank you!

lcfd avatar Mar 27 '24 10:03 lcfd

I also have a Mac but never had to use those deep links. What are those links, where to find them and where do they lead to?

chrishrb avatar Apr 09 '24 07:04 chrishrb

Hi @chrishrb, in the case I've mentioned deep links allow you to control/use applications on your Mac.

For example message:%3C....%3E will open the specified email in the mail app.

In the Neovim context, it's helpful to create "connections" between applications. For example, I'm saving email deep links so I can go directly to the email without searching it again.

Another example is the Bear application:

https://bear.app/faq/x-callback-url-scheme-documentation/

lcfd avatar Apr 09 '24 10:04 lcfd

As I said - never heard of it. But sounds quite useful! 👍 But this plugin currently only supports the browser app. I want to keep this plugin simple and small, so I don‘t think this would make sense to implement here. Maybe you write an own plugin for this use case?

chrishrb avatar Apr 09 '24 10:04 chrishrb

Those are just links you can type in the browser, so it should be possible to support them without dealing with other applications than the browser.

I don't know if I'm correct or not, but I think it's just a matter of regexp.

If I'm over one of those links with the cursor and pressing gx it's enough that the plugin recognize them as URLs. At the moment it works only with https:// and all the rest is searched as a Google query. What if also {APP_NAME}:// is supported?

Maybe here: https://github.com/chrishrb/gx.nvim/blob/ea4cc715326a8bd060a450c24c3c9831cdee2f59/lua/gx/handlers/url.lua#L12

Does it make sense for you?

lcfd avatar Apr 09 '24 10:04 lcfd