Closed aarondill closed 2 months ago
Fixed in #46
@sportshead @chrishrb I've tested this with the latest HEAD(4136a82a48e8601fe8f2fde5d2ac2d706ac6d0b6) with both of these:
chrishrb/gx.nvim#46
neovim/neovim#23943
the first results in a choice between opening https://chrishrb/gx.nvim#
and a google search.
The second results in an error gx.nvim: No remote git repository found!
and a google search.
mkdir .repro && cd "$_" && git init && touch file && nvim file
V
OR 0v$
gx
to open the linkrm -f file && rm -rf .git && cd .. && rmdir .repro
@aarondill - thanks for the testing!
The first issue is a problem with the matching regex that doesn't include the .
character while searching. The second also is that the plugin cannot find a remote. However, I can make it fallback to use github.com
in the case that no repo is found but both owner
and repo
are passed.
Opening a github url like
org/repo#issue
instead tries to open the current git remote URL (and fails due to #45). for example:pressing
gx
onneovim/neovim#23943
results in the choice between searching the string or openinghttps://github.com/sindrets/diffview.nvim.git (fetch)/issues/23943
Instead, this should open
https://github.com/neovim/neovim/issues/23943