return { 'rmagatti/gx-extended.nvim',
keys = { 'gx' },
opts = {
extensions = {
patterns = { '*/plugins/**/*.lua' },
match_to_url = function(line_string)
local line = string.match(line_string, "[\"|'].*/.*[\"|']")
local repo = vim.split(line, ':')[1]:gsub('"', '')
local url = 'https://github.com/' .. repo
if not line or not repo then
return nil
end
return url
end,
}
}
}
consider this config:
given that https://github.com/rmagatti/gx-extended.nvim/blob/6c4bc65e770fc51a1ffe598cab1d4304f60f3182/lua/gx-extended/lib.lua#L11