-
-
Notifications
You must be signed in to change notification settings - Fork 9
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Struggling to get a custom router using ssh remote with port #248
Comments
hi @ErickKramer, You need to build the opts.router = {
browse = {
["^gitlab.myhost.com%"] = "https://gitlab.myhost.com/"
.. "{_A.ORG}/"
.. "{_A.REPO}/blobs/"
.. "{_A.CURRENT_BRANCH}/"
.. "{_A.FILE}"
.. "#L{_A.LSTART}"
.. "{(_A.LEND > _A.LSTART and ('-L' .. _A.LEND) or '')}",
}
} The |
Also see here: gitlinker.nvim/lua/gitlinker/configs.lua Lines 17 to 26 in a221c13
|
Thank you for the quick response. I checked your suggestion with the way to define the router and it is defined correctly now. However, it still fails to parse the enterprise gitlab I am using at the moment. I was expecting the parsing of the remote host to fail due to the custom ssh port, but it seems that the issue is actually caused when having a "complex" enterprise domain. With "complex" I mean a gitlab remote like
I haven't managed to find the router that can match such domain. The following router works well, if I remove the router = {
browse = {
["^gitlab.myhost.com"] = "https://gitlab.myhost.mysecond-host.com/"
.. "{_A.ORG}/"
.. "{_A.REPO}/blobs/"
.. "{_A.CURRENT_BRANCH}/"
.. "{_A.FILE}"
.. "#L{_A.LSTART}"
.. "{(_A.LEND > _A.LSTART and ('-L' .. _A.LEND) or '')}",
},
}, I tried using I also tried using |
hi @ErickKramer,
Because the key |
Thanks a lot! that was definitely what I was missing :) |
Thank you for maintaining this plugin! I was on the way to develop something similar when I found this.
I was going through your README.md and tried to get a custom router working for my enterprise Gitlab, but I am doing something wrong and I cannot identify what.
My current config looks as follows
The remotes that we used are with the following form
ssh://[email protected]:9898/some_group/some_repo.git
While running the
GitLink my_gitlab
I get the following errorDo you have some idea how I can configure my custom router for this particular case?
The text was updated successfully, but these errors were encountered: