Closed rmagatti closed 1 year ago
Rework matching and opening functions for better multi-registration handling
The plugin now takes the following steps after gx:
gx
match_to_url
vim.ui.select
Changes
registry
matched_patterns
lib.lua
try_open
name
RegistrationSpec
no-protocol-urls
no-protocol-urls.lua
[lua/gx-extended/lib.lua]
https://github.com/rmagatti/gx-extended.nvim/assets/2881382/f7f09f3b-cd88-4f91-a1db-d2f4dc9246c2
Closes #10
Rework matching and opening functions for better multi-registration handling
The plugin now takes the following steps after
gx
:match_to_url
vim.ui.select
. If not it opens the only succeeding call.Changes
registry
andmatched_patterns
in thelib.lua
file.try_open
function in thelib.lua
file to handle multiple registrations.lib.lua
file.name
property to theRegistrationSpec
in thelib.lua
file.match_to_url
function to handle URLs with and without protocols in theno-protocol-urls
extension in theno-protocol-urls.lua
file.[lua/gx-extended/lib.lua]
registry
matched_patterns
try_open
to handle multiple registrationsname
property toRegistrationSpec
[lua/gx-extended/extensions/no-protocol-urls.lua]match_to_url
function to handle URLs with and without protocols in theno-protocol-urls
extensionhttps://github.com/rmagatti/gx-extended.nvim/assets/2881382/f7f09f3b-cd88-4f91-a1db-d2f4dc9246c2
Closes #10