dotnet / vscode-csharp

Official C# support for Visual Studio Code
MIT License
2.88k stars 676 forks source link

auto-complete is terrible #7592

Open alexezh opened 2 months ago

alexezh commented 2 months ago

Type: Bug

auto-complete is annoying. Empty line, I want to add two tabs. Complete suggests some wrong code. Click esc, tab. It suggests the same again. Another esc..

Extension version: 2.45.25 VS Code version: Code 1.93.0 (Universal) (4849ca9bdf9666755eb463db297b69e5385090e3, 2024-09-04T13:02:38.431Z) OS version: Darwin arm64 23.6.0 Modes:

System Info |Item|Value| |---|---| |CPUs|Apple M2 Max (12 x 2400)| |GPU Status|2d_canvas: enabled
canvas_oop_rasterization: enabled_on
direct_rendering_display_compositor: disabled_off_ok
gpu_compositing: enabled
multiple_raster_threads: enabled_on
opengl: enabled_on
rasterization: enabled
raw_draw: disabled_off_ok
skia_graphite: disabled_off
video_decode: enabled
video_encode: enabled
webgl: enabled
webgl2: enabled
webgpu: enabled
webnn: disabled_off| |Load (avg)|3, 2, 2| |Memory (System)|64.00GB (3.06GB free)| |Process Argv|--crash-reporter-id 0a732980-b20c-46f8-b997-5ac8d8ce8f36| |Screen Reader|no| |VM|0%|
A/B Experiments ``` vsliv368cf:30146710 vspor879:30202332 vspor708:30202333 vspor363:30204092 vscod805cf:30301675 binariesv615:30325510 vsaa593cf:30376535 py29gd2263:31024239 c4g48928:30535728 azure-dev_surveyone:30548225 962ge761:30959799 pythongtdpath:30769146 welcomedialogc:30910334 pythonnoceb:30805159 asynctok:30898717 pythonregdiag2:30936856 pythonmypyd1:30879173 2e7ec940:31000449 pythontbext0:30879054 accentitlementsc:30995553 dsvsc016:30899300 dsvsc017:30899301 dsvsc018:30899302 cppperfnew:31000557 dsvsc020:30976470 pythonait:31006305 dsvsc021:30996838 01bff139:31013167 pythoncenvpt:31062603 a69g1124:31058053 dvdeprecation:31068756 dwnewjupytercf:31046870 2f103344:31071589 impr_priority:31102340 nativerepl1:31104043 refactort:31108082 pythonrstrctxt:31112756 wkspc-onlycs-c:31111717 wkspc-ranged-c:31125598 fje88620:31121564 aajjf12562:31125793 ```
dibarbet commented 2 months ago

@alexezh would you be able to provide a gif of the behavior you're seeing? There could be multiple extensions involved depending on where the auto complete is coming from

alexezh commented 2 months ago

I have a small C# file with a function indented at 2 tabs. I have an empty line in the middle of the class; and I want to type a comment. VS shows some random suggestion next to IP. If I type tab, suggestion is accepted and this is not what I want. So I click Esc, Tab. VS idents IP and immediately shows the same suggestion. I have to recognize this and do Esc/Tab again.

Is there a way to disable suggestions until I actually start typing? The current complete logic is not good at guessing without input, so I would rather not spend time clicking Esc over and over.

On Tue, Sep 24, 2024 at 10:45 AM David Barbet @.***> wrote:

@alexezh https://github.com/alexezh would you be able to provide a gif of the behavior you're seeing? There could be multiple extensions involved depending on where the auto complete is coming from

— Reply to this email directly, view it on GitHub https://github.com/dotnet/vscode-csharp/issues/7592#issuecomment-2371925321, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAX5T3QFKK3S6IWVPFYBORLZYGQKVAVCNFSM6AAAAABOU2YHCWVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDGNZRHEZDKMZSGE . You are receiving this because you were mentioned.Message ID: @.***>

dibarbet commented 2 months ago

@alexezh generally completion from the C# extension shouldn't be active until you start typing. I'm wondering if there is some other extension providing completions. Would you mind sharing either a gif or a screenshot of the suggestion? And what extensions you have installed?