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

Completion trigger behavior on word start characters changed in 1.79 #185286

Closed
dibarbet opened this issue Jun 15, 2023 · 9 comments
Closed

Completion trigger behavior on word start characters changed in 1.79 #185286

dibarbet opened this issue Jun 15, 2023 · 9 comments
Assignees
Labels
suggest IntelliSense, Auto Complete under-discussion Issue is under discussion for relevance, priority, approach

Comments

@dibarbet
Copy link
Member

Does this issue occur when all extensions are disabled?: No, requires an extension to provide completions. The sample completion extension is good enough to illustrate the issue.

  • VS Code Version: 1.79.2
  • OS Version: Windows_NT x64 10.0.22621

It looks like completion trigger behavior changed sometime between 1.78.2 and 1.79.2. Previously (in 1.78.2), it looks like completion providers did not get triggered if you started typing at the beginning of an existing word. In 1.79.2 it appears as though this changed to call completion providers when typing at the beginning of an existing word.

This is leading to bug reports on our extension that completion is replacing too much. dotnet/vscode-csharp#5801. I can make a change to fix this behavior on the extension side, but wanted to first check if this behavior change was expected on the vscode side first.

Steps to Reproduce:

I used the sample extension to reproduce the issue. See dibarbet/vscode-extension-samples@bb0a037 for the exact code I used.

With 1.79.2 installed:

  1. With the above extension code (or similar) running, start typing at the beginning of a word (using a character that matches something that would show up in the list).
  2. Note how the completion list shows up.

Example -
completion_1_79_2

Then, downgrade to 1.78.2:

  1. With the same extension code, start typing the same character at the beginning of a word.
  2. Note how the completion list does not show up.

Example -
completion_1_78_2

@jrieken jrieken added suggest IntelliSense, Auto Complete under-discussion Issue is under discussion for relevance, priority, approach labels Jun 16, 2023
@jrieken
Copy link
Member

jrieken commented Jun 16, 2023

but wanted to first check if this behavior change was expected on the vscode side first.

Yes, we made that change on purpose and to make it easier to use quick suggestion. It would be best if you can update your extension accordingly. Let us know if you need further help

@nicbarker
Copy link

I'm not sure if this is the right place to provide feedback on an issue like this, but this issue was intensely frustrating for us. VSCode constantly prompts users to update to the latest version. The VSCode C# extension is the 4th most popular language extension (18th overall) on the marketplace with 22M downloads. It's an official Microsoft extension, so it's surprising to me these changes weren't identified as risky and tested against language extensions that offer auto complete. It's annoying enough that I've just switched off automatic updates.

@jrieken
Copy link
Member

jrieken commented Jun 21, 2023

so it's surprising to me these changes weren't identified as risky and tested against language extensions that offer auto complete.

Sorry that you had such an experience but let me explain why we thought (and still think) this is a low risk change. Suggestions in VS Code can be triggered manually (ctrl+space) or automatically as you type (editor.quickSuggestions setting). There are also trigger character but they don't play into this issue.

It's important to know that the API is defined so that extensions can not know if suggest has been requested manually or automatically. For an extension both request appear as the same.

Now to the change: until 1.79 quick suggestions have been limited to word ends, with 1.79 quick suggestions also happen when typing at word starts. Quick suggestion does not happen when typing inside words.

Effectively extensions are much more likely being invoked at word starts but the fact that suggestions are being invoked at word starts isn't something new. (You can validate that by triggering suggestions manually at a word start with earlier versions of VS Code and C#.) It seems that this change in asking for suggestion has exposed some kind of bogus behaviour in the C# extensions (and TBH that's the only extension we have heard about).

I am sorry, this wasn't caught earlier. The change was in Insiders for a few weeks but it looks the C# insiders usage is low or this issue wasn't perceived as so bad. So, this my invitation to you and others to use Insiders and help you iron these things out.

@jrieken jrieken closed this as completed Jun 21, 2023
@nullism
Copy link

nullism commented Jun 22, 2023

While I've been a long time VSCode user, this will force me to switch editors. Such a frustrating change.

@dogchester
Copy link

incredibly annoying

@gjsjohnmurray
Copy link
Contributor

this will force me to switch editors

@nullism why not wait for OmniSharp/omnisharp-roslyn#2542 to ship?

@nullism
Copy link

nullism commented Jun 22, 2023

@gjsjohnmurray oh, I missed that! Yeah, I'll do that. Thanks!

Will continue playing with Jetbrain's Fleet in the meantime (seems pretty okay).

@dibarbet
Copy link
Member Author

Just wanted to followup on this from my side. Version 1.26.0 of the C# extension has just been released which should fix the issue there.

@nullism
Copy link

nullism commented Jun 23, 2023

Just wanted to followup on this from my side. Version 1.26.0 of the C# extension has just been released which should fix the issue there.

Can confirm it is fixed for me! Thanks for the update!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
suggest IntelliSense, Auto Complete under-discussion Issue is under discussion for relevance, priority, approach
Projects
None yet
Development

No branches or pull requests

8 participants