solomonkinard / public

Other
4 stars 2 forks source link

How is the `logClickUrls` supposed to work? #13

Closed robin-pham closed 3 months ago

robin-pham commented 3 months ago

I've tried arbitrary regex's as keys with capture groups and I'm not sure if I'm doing something wrong or if there's some documentation I'm missing.

I was under the impression that this feature would turn parts of the 1 liner git blame message into clickable urls but perhaps I'm wrong.

e.g. config

  "git-blame.config.logClickUrls": {
    "\\(#(\\d+)\\)": "https://github.com/test/repo/pull/$1"
  },
Screenshot 2024-05-06 at 5 12 08 PM

I figured that #12345 would now be clickable.

solomonkinard commented 3 months ago

It looks like you're right. I probably made a mistake. The good news is that I was able to get your configuration to work without a code change. I'll put a code change on the long list of things to eventually get to, now that you have a functional workaround.


    "(#(\\d+))": "https://github.com/test/repo/pull/$1"
  }```
robin-pham commented 3 months ago

hmm I think maybe I'm missing something still, even with that new regex, nothing seems clickable. Am I supposed to command click? Is there a hotkey?

solomonkinard commented 3 months ago

This seemed to work just fine with a regular click.

Screenshot 2024-05-07 at 20 49 14
robin-pham commented 3 months ago

Oooh ok I understand the feature now. I was expecting the inline comments to be clickable e.g.

Screenshot 2024-05-08 at 11 40 38 AM

I can contribute to this if the code is available anywhere for me to hack on, I feel like inline clicks are much more valuable and similar to the other git blame plugins out there

solomonkinard commented 3 months ago

Your completely new feature request has been implemented here, in an experimental build. Enjoy.