Skip to content
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

Add patterns in default callbacks #69

Open
Sayrus opened this issue Nov 23, 2022 · 2 comments · May be fixed by #70
Open

Add patterns in default callbacks #69

Sayrus opened this issue Nov 23, 2022 · 2 comments · May be fixed by #70
Assignees
Labels
enhancement New feature or request

Comments

@Sayrus
Copy link

Sayrus commented Nov 23, 2022

Is your feature request related to a problem? Please describe.

Many companies have custom domains for their git hosting. These domains often start by the forge name (gitlab., github., bitbucket.) and having mixed domains/forge is very rare (GitHub instance on gitlab.mycompany.tld for instance)

Describe the solution you'd like

After using GitLinker for a while, I only now discovered that it already supports host with wildcards. Since false-positive are very rare and can be overridden with the TLD anyway, I think that providing patterns by default might be a good default. This reduces entry-cost for user and will make GitLinker work with most enterprise forges by default.

Here are some pattern I have observed:

  • bitbucket.*: BitBucket
  • gitlab.*: Gitlab
  • ghe.*: GitHub (short for GitHub Enterprise)
  • github.*: GitHub

Describe alternatives you've considered

If adding patterns to the defaults are not something you want on GitLinker, can we add a short documentation to ensure users know they are able to use wildcards?

Additional context

N/A, thanks for this awesome project !

@Sayrus Sayrus added the enhancement New feature or request label Nov 23, 2022
@Sayrus Sayrus linked a pull request Nov 23, 2022 that will close this issue
@linrongbin16
Copy link

I want the same function, regex pattern is quite useful!

stevanmilic pushed a commit to stevanmilic/gitlinker.nvim that referenced this issue Nov 12, 2023
@linrongbin16
Copy link

hi @Sayrus , let's track this issue in https://github.com/linrongbin16/gitlinker.nvim

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants