Closed Epskampie closed 1 year ago
Adding that the steps to replicate on my end are pretty simple. Went to VScode Extensions marketplace, installed this extension, restarted VSCode, copilot keeps babbling into my comments. No further steps taken on my end
Even this catch all has no effect on copilot:
"disable-copilot-comment-completions.inhibitMatchers": [
".*",
],
Hey, I had some time earlier this week to take another look at the (admittedly sorry) state of the code base for this extension and ironed out the bugs causing this issue, as well as adding some features from other open issues in this repo. I'll be pushing the changes live soon fellas, sorry for the wait and thanks for the bug reports :)
Thanks for making copilot usable! This should really be a built-in feature, and applies to more than just comments. Writing strings for error messages or logs is just as frustrating, being able to control exactly when inline suggestions happen is a must have IMO.
After randomly flipping switches and turning dials in the settings, I was able to get my instance working. Not sure what the secret sauce was but this was my final settings.json:
"github.copilot.enable": {
"*": true,
"yaml": false,
"plaintext": false,
"markdown": false
},
"disable-copilot-comment-completions.active": true,
"disable-copilot-comment-completions.inhibitMatchers": [
"\\bcomment\\b"
],
"github.copilot.inlineSuggest.enable": true
Actually, I believe the secret sauce has something to do with the project I have opened. When I open a Remote-SSH workspace it doesn't work, but opening a local folder does.
Worry not, the bugs that were causing this Extension's less-than-satisfactory success rate have already been solved (locally). Whatever arcane jiu-jitsu you're currently trying to deduce as to being responsible for the extension suddenly working for you isn't necessary, just hold tight and I'll have a new release live for you in a few moments here
bump
Just pushed version 2.0.0 live. Not sure when it will update on the VSCode Extension Marketplace, but it should be within the next few minutes or so. Closing this issue, as the bugs reported here are all fixed (locally, that is, at least 😅) in this new release. If you folks encounter any new issues that I missed or other weird behavior please open new issues accordingly and I will patch them ASAP.
Thanks for the reports, and moreover the enthusiasm in my little extension 🤗
@ferm10n @Colossus @Epskampie
The problem for me was that I needed to type "//" and then SPACE for it to activate (perhaps even waiting a few millis before pressing space). Keep your eye on "Suggestions enabled/disabled" on the bottom right. Would be good if that was fixed, but overall a very useful extension.
The problem for me was that I needed to type "//" and then SPACE for it to activate (perhaps even waiting a few millis before pressing space). Keep your eye on "Suggestions enabled/disabled" on the bottom right. Would be good if that was fixed, but overall a very useful extension.
This delay you're experiencing is intentional, since the extension used to query the textmate tokens at the cursor position requires a full re-parse of the document each time it's queried. Without this delay (or more accurately, throttle), the extension could get laggy and unresponsive due to having to parse the entire document each time the cursor position moves (aka every key stroke).
You can change this delay manually if you desire, though. The setting that controls it is disable-copilot-comment-completions.eventProcessingThrottleDelayMs
.
Thanks for the reply. You should still either fix this or make this very clear on the readme because I (along with a few others it seems) thought the extension simply didn't work and had to trawl through settings for about 20 mins before realising. Most people will just type //
and see a completion and then give up.
Is it possible to query last key pressed on each keystroke? I.e. if it's a /
or a *
then bypass the throttle and re-parse the tokens?
Thanks for the reply. You should still either fix this or make this very clear on the readme because I (along with a few others it seems) thought the extension simply didn't work and had to trawl through settings for about 20 mins before realising. Most people will just type
//
and see a completion and then give up.Is it possible to query last key pressed on each keystroke? I.e. if it's a
/
or a*
then bypass the throttle and re-parse the tokens?
In the next update I will review the default settings and make sure that a reasonable value is set for this option, I'm not sure what it's set to by default currently but if the extension was so-so for you until you manually changed it that tells me I probably did something boneheaded with it lol.
As for your suggestion, the intent of the extension is to be language agnostic-- different languages have different comment syntaxes that I would have to account for if I was implementing your idea there. Additionally, not everyone uses this extension to silence copilot in comments (despite the naming/branding of the extension). Some people use it to disable suggestions while editing a git commit file, for example.
Glad that the extension is working for you, though-- even after some frustrating configuration issues. I will revisit the setting/readme when I next work on this project to address your concerns.
Hey this extension seems great, but it does not seem to work, perhaps due to copilot updates.
Running
1.0.2
0.0.9
1.74.3
1.71.8269
I've tried putting the exact scope scope in inhibitMatchers, but no dice, copilot keeps suggesting stupid shit in comments.