Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

@id:editor.suggest.insertMode not honored #5801

Closed
ingusbrauns opened this issue Jun 14, 2023 · 25 comments · Fixed by OmniSharp/omnisharp-roslyn#2542
Closed

@id:editor.suggest.insertMode not honored #5801

ingusbrauns opened this issue Jun 14, 2023 · 25 comments · Fixed by OmniSharp/omnisharp-roslyn#2542

Comments

@ingusbrauns
Copy link

Type: Bug

Issue started a roughly a week ago.

  1. Open a C# file.
  2. Wait for vscode to finish loading whatever it is that causes this behavior.
    Doesn't seem to be a problem while vscode is not fully loaded.
  3. Place cursor in front of a word.
    E.g |string (where pipe is cursor)
  4. Type parital word word.
    E.g IEnu|string
  5. BUG: After accepting the suggestion, the original word is replaced.
    E.g. IEnumerable|
    Expected: After accepting the suggestion, the suggestion is inserted before the original word.
    E.g. IEnumerable|string

Attempted fixes:
Checked setting @id:editor.suggest.insertMode, defaults to insert.
Changed this setting to be explicitly insert, same issue
Changes this setting to be explicitly insert for [csharp], same issue.

Extension version: 1.25.9
VS Code version: Code 1.79.0 (b380da4ef1ee00e224a15c1d4d9793e27c2b6302, 2023-06-07T14:26:35.552Z)
OS version: Windows_NT x64 10.0.22621
Modes:

System Info
Item Value
CPUs 11th Gen Intel(R) Core(TM) i5-1135G7 @ 2.40GHz (8 x 2419)
GPU Status 2d_canvas: enabled
canvas_oop_rasterization: disabled_off
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
video_decode: enabled
video_encode: enabled
vulkan: disabled_off
webgl: enabled
webgl2: enabled
webgpu: enabled
Load (avg) undefined
Memory (System) 15.71GB (3.67GB free)
Process Argv --crash-reporter-id ae82a74b-93b7-4d00-8ca3-7642401f37eb
Screen Reader no
VM 0%
A/B Experiments
vsliv368cf:30146710
vsreu685:30147344
python383:30185418
vspor879:30202332
vspor708:30202333
vspor363:30204092
vstes627:30244334
vslsvsres303:30308271
vserr242cf:30382550
pythontb:30283811
vsjup518:30340749
pythonptprofiler:30281270
vshan820:30294714
vstes263:30335439
vscod805:30301674
binariesv615:30325510
bridge0708:30335490
bridge0723:30353136
vsaa593cf:30376535
pythonvs932:30410667
vsclangdc:30486549
c4g48928:30535728
dsvsc012:30540252
pynewext54:30695312
azure-dev_surveyone:30548225
2e4cg342:30602488
pyind779:30671433
89544117:30613380
pythonsymbol12:30671437
2i9eh265:30646982
showlangstatbar:30737416
vsctsb:30748421
pythonms35:30701012
03d35959:30757346
pythonfmttext:30731395
pythoncmvfstrcf:30756944
fixhidewlkth:30730051
hideindicator:30766889
pythongtdpathcf:30739705
dh2dc718:30763024
pythonnosm12tcf:30765602

@KBEP
Copy link

KBEP commented Jun 14, 2023

Same bug. Option is ignored even if forced to set it to 'insert' in 'settings.json' file. If the extension disabled, the editor works as expected.

@starball5
Copy link

starball5 commented Jun 14, 2023

Related on Stack Overflow:

Help with closing the duplicates would be appreciated to put all the answers in a single place for the benefit of future readers.

@ig0rmin
Copy link

ig0rmin commented Jun 15, 2023

The same for me, except I'm using Go. I'm pretty sure this bug is not new since it has been annoying me for quite a while, just today I finally got to google how to get rid of it.

@daniel-keen
Copy link

Is there any workaround? This is driving me crazy. I don't really wanna switch to another IDE just because of this issue...

@dibarbet
Copy link
Member

@genlu looks like this issue is also impacting O# - do you know if there was a bug on the vscode side for this?

@GrahamMThomas
Copy link

GrahamMThomas commented Jun 15, 2023

I'm losing my mind please fix.
animation2

@dibarbet
Copy link
Member

dibarbet commented Jun 15, 2023

old comment I can confirm this behavior changed in VSCode 1.79.0.

Downgrading to VSCode 1.78.2 gives back the old behavior.
vscode_insert_completion

Still investigating if the extension is doing something wrong here or if VSCode introduced a bug

Update:
It looks like there is a behavior in completion triggering between 1.78.2 and 1.79.2. In 1.78.2, the completion list does not show up on typing in the front of a word. For example,

vscode_completion_in_front

In 1.79.2 however, the completion list does show up.
vscode_completion_in_front_79

We are getting asked for completions for partial typing in the front of an identifier when we were not before.

@dibarbet
Copy link
Member

Filed microsoft/vscode#185286 to ask if this behavior change is expected.

@dibarbet
Copy link
Member

For now, the only workaround I can suggest is to downgrade vscode to 1.78.2.

@nsxdavid
Copy link

I opened an issue on the Insider Build before and it was auto-closed because it was considered an "extension" bug. In my case, I was using C#, so someone (or some bot) just assumed that the extension was at fault. It might be, but I notice in the notes on this issue that other languages seem affected so.... maybe not?

This is a maddening bug as it impacts the flow of coding in an super obnoxious way. Doubly maddeningly because attempts to report the issue (like I did) before it got into the release were just dismissed rather than someone looking into it.

@Guy-Michael
Copy link

Stated having this issue a few days ago as well. Super annoying.
I'm certain this is related to the C# extension as this stopped happening when I removed it.

@CWolfs
Copy link

CWolfs commented Jun 16, 2023

I've been experiencing this too and it's very annoying. From following the comments on the post @dibarbet posted (microsoft/vscode#185286) it looks like changes to VSCode has had a knock on effect. Guess we're waiting for the plugin to be updated to factor this in (or downgrade our VSCode).

@genlu
Copy link
Member

genlu commented Jun 16, 2023

This is the same issue as #5777
Fixed by dotnet/roslyn#68624

Actually, I just noticed this is the OmniSharp server. This is not yet fixed, but we are trying to make a similar fix as above.

@dibarbet
Copy link
Member

Fix for O# is here - OmniSharp/omnisharp-roslyn#2542
Note that it will take some time to get an extension uploaded with this change. Will likely not happen until sometime next week.

@dibarbet
Copy link
Member

Version 1.26.0 of the C# extension has been released with the fix.

@BlinksTale
Copy link

If anyone is wondering how to do the 1.26 C# upgrade, going to Extensions > Installed > C# > Reload Required (click) worked for me!

@bwiklund
Copy link

this is happening again with the latest version, v2.0.357

@starball5
Copy link

People seem to be reporting a similar (same?) issue with v2.0.413: see this and v2.1.2: see this

@kennypu
Copy link

kennypu commented Sep 19, 2023

Can confirm the issue is still present on both the stable (2.1.2) and pre-release (2.2.10) versions in the Marketplace

@spbuda
Copy link

spbuda commented Dec 21, 2023

I'm seeing this issue again. Seems to have started back up recently because I don't remember it always having this annoying behavior.

@seawatts
Copy link

seawatts commented Jan 8, 2024

I'm seeing this as well in .ts and .tsx files

Version: 1.86.0-insider (Universal)
Commit: 1cfc62d46e6b9dd217cd485d7d4591136f421d70
Date: 2024-01-05T16:22:08.665Z (2 days ago)
Electron: 27.1.3
ElectronBuildId: 25612240
Chromium: 118.0.5993.159
Node.js: 18.17.1
V8: 11.8.172.18-electron.0
OS: Darwin arm64 23.2.0

@David-J-Ross
Copy link

Editing C++ code, running VSC version 1.85.2 with no c# extension installed, I experience this awful bug.
Version: 1.85.2 (user setup) Commit: 8b3775030ed1a69b13e4f4c628c612102e30a681 Date: 2024-01-18T06:40:10.514Z Electron: 25.9.7 ElectronBuildId: 26354273 Chromium: 114.0.5735.289 Node.js: 18.15.0 V8: 11.4.183.29-electron.0 OS: Windows_NT x64 10.0.19045

@starball5
Copy link

@David-J-Ross Sir, this is a Wendys the dotnet/vscode-csharp GH repo.

@David-J-Ross
Copy link

David-J-Ross commented Jan 31, 2024 via email

@dibarbet
Copy link
Member

dibarbet commented Jan 31, 2024

For the C++ extension, I would start here - https://github.com/Microsoft/vscode-cpptools/issues
Potentially related: microsoft/vscode-cpptools#11819

If people are having issues in C# using the C# extension, please file a new issue in this repo. I can't help with other languages unfortunately :(

# for free to join this conversation on GitHub. Already have an account? # to comment
Projects
None yet