gitlinker.nvim
gitlinker.nvim copied to clipboard
feat: support function for option - remote
hi @MunifTanjim ,
Seems ruifm doesn't maintain this repo any longer.
This feature is been implemented in my fork: https://github.com/linrongbin16/gitlinker.nvim.
Hey @linrongbin16 , I looked into your fork a few days ago. But couldn't figure out how to provide a function to dynamically set remote.
Hey @linrongbin16 , I looked into your fork a few days ago. But couldn't figure out how to provide a function to dynamically set
remote.
Type below command:
GitLink remote=upstream: copy the generated url to clipboardGitLink! remote=upstream: open the generated url in browser.
The upstream is the remote configured in the git repository's .git/config.
For example in my gitlinker fork, the .git/config is:
There's only 1 configured remote: origin. So the GitLink and GitLink remote=origin are doing the same thing: they all generate the link for the origin remote (e.g. the repo hosted in GitHub).
Once your git repo contains multiple remote, the GitLink command will use the first detected remote, if you want to specify a remote, use GitLink remote=upstream will link you to the upstream remote.