fix(gx): allow @ in url

This will make `gx` work for links for the form
https://hachyderm.io/@neovim.
This commit is contained in:
dundargoc 2024-06-03 11:55:20 +02:00 committed by dundargoc
parent 054a287dbe
commit a9c89bcbf6

View File

@ -179,7 +179,13 @@ function M._get_url()
current_node = current_node:parent()
end
end
return vim.fn.expand('<cfile>')
local old_isfname = vim.o.isfname
vim.cmd [[set isfname+=@-@]]
local url = vim.fn.expand('<cfile>')
vim.o.isfname = old_isfname
return url
end
return M