dotnet / roslyn

The Roslyn .NET compiler provides C# and Visual Basic languages with rich code analysis APIs.
https://docs.microsoft.com/dotnet/csharp/roslyn-sdk/
MIT License
19.04k stars 4.03k forks source link

editor taking spacebar to mean acceptance of autocompletion suggestions #69591

Open arunchndr opened 1 year ago

arunchndr commented 1 year ago

From vscode-dotnettools created by claudiaregio: microsoft/vscode-dotnettools#222

Describe the Issue

I am typing and I will get autocompletion suggestions. I try to hit the spacebar just because I am moving onto a new word but the editor is taking spacebar to mean acceptance of the suggestion thus putting things I don't want in my code. I have to go back and delete it or press esc first.

Steps To Reproduce

Type anything that gives you autocompletion suggestions and press space when it comes up

Expected Behavior

For just tab or enter to be acceptance of an autocompletion or at least have a setting to turn off this functionality. It doesn't occur in other language files (python for example) and it got super frustrating that I had to go back and continuously remove code I wasn't even typing. As I'm typing I don't want to have to hit esc before moving onto my next words continuously

Environment Information

Apple M2 Pro OS: Ventura 13.2.1 C# Dev Kit: v0.1.103 C#: v0.1.103 Intellicode for C# Dev: v0.1.23

genlu commented 1 year ago

acceptance of the suggestion thus putting things I don't want in my code

@claudiaregio Could you please provide more detail on this? There are difference scenarios that might cause the issue you are experiencing:

For just tab or enter to be acceptance of an autocompletion or at least have a setting to turn off this functionality.

This seems to be a request for "suggestion mode". There's editor.suggest.selectionMode in VSCode, could you see if it does what you want? Note it's different from the SuggestionMode in VS, as it doesn't try to select anything, in contrast to hard vs soft selection in VS.