jamesonknutson / disable-copilot-comment-completions

MIT License
17 stars 3 forks source link

How to disable CoPilot suggestions in COMMIT_EDITMSG? #5

Closed ryanberckmans closed 1 year ago

ryanberckmans commented 1 year ago

Hi, great extension, thanks!

I like to write my own commit messages and use vsc as the editor to do so.

My workflow looks like:

  1. git add ... # on command-line
  2. git commit # opens COMMIT_EDITMSG in vsc
  3. write commit msg in vsc, save, close buffer --> commit completes

I would like CoPilot to never make any suggestions when I'm editing a file named COMMIT_EDITMSG. How can I do that?

jamesonknutson commented 1 year ago

Hello there, I have just implemented this feature in the fresh-off-the-press 2.0.0 release. The feature is implemented as glob pattern matcher rules, which you can read more about here.

To instruct this Extension to silence Copilot suggestions inside of files named COMMIT_EDITMSG as you so described, the following configuration could be applied:

{
  "disable-copilot-comment-completions.globPatternRules": [
    "**/COMMIT_EDITMSG"
  ]
}

This would instruct the Extension to silence inline suggestions whenever it is discovered that the active selection is contained within a document whose filename is exactly COMMIT_EDITMSG, in any folder.

Thanks for the suggestion, and if you have the time, give the new release of the Extension a try and see if the new feature works for you. And hey, if it does, I would be oh-so-flattered if you were to leave a review, but that's neither here nor there.

Have a good one!

ryanberckmans commented 1 year ago

Thanks!

ryanberckmans commented 1 year ago

Is it possible that you could publish this extension for vsc 1.73? I'm stuck on 1.73.1 because 1.74 broke Customize UI.