-
Hi, netrw offers gx command, which runs system open. But nvim-tree instructions guide to disable netrw, after which the 'gx' command to open urls under cursor disappears too. How to map back gx? I tried this, but it is not correct syntax. I don't know lua, so how could I get something like this to work?
The above fails with some syntax error:
If you question why I need flatpak-xdg-open instead of xdg-open, I need flatpak-xdg-open, as I'm in container while running this on Fedora Silverblue... |
Beta Was this translation helpful? Give feedback.
Replies: 5 comments 6 replies
-
went around it in init.lua until I get something better. |
Beta Was this translation helpful? Give feedback.
-
I might be misunderstanding; can you simply use "Run System", default Edit: Change See |
Beta Was this translation helpful? Give feedback.
-
Thanks, perhaps that's about the same as I ended up having there (vim.fn.system), or does it do something different?
Just for clarity, this is not in nvim-tree panel, but anywhere in any buffer that has url under cursor. I will remove the html check from above, as then it will just open any application the uri gives. |
Beta Was this translation helpful? Give feedback.
-
My lack of lua understanding makes me fail here. How can you call the function in keys{}? It always says api is undefined global or smth. If I add function there, it doesn't complain when there is require, but it won't do anything either.
|
Beta Was this translation helpful? Give feedback.
-
This is the simplest I get it into, and I link the xdg-open to flatpak-xdg-open in my .local/bin:
|
Beta Was this translation helpful? Give feedback.
This is the simplest I get it into, and I link the xdg-open to flatpak-xdg-open in my .local/bin: