❔ C# dev kit completion "args"
Hey I'm trying vscode and I stumbled upon this behavior that seems strange.
When it autocompletes after opening (), it completes with the named argument
args
even if I don't take it (by doing ", to input a string myself)
Can I disable this behavior ?40 Replies
Result after inputing "
I can prevent it by using Esc but it's boring to do for every methods
You can observe exactly the same behavior on https://sharplab.io
SharpLab
C#/VB/F# compiler playground.
But it has been a long time so I think it's not a particular issue of c# dev kit
Please use the command palette to file an issue on the C# extension (not devkit)
Okay I just wanted to see if someone else was having the same issue
Hmm, actually, I cannot reproduce that
Even on sharplab.io ?
Don't use sharplab as a testbed for this
Okay you are not using copilot ?
I love it, but the editor support is terrible, and only marginally related to what vscode does
Yeah you're right
I'm saying that because the completion behavior is totally different with copilot
Copilot shouldn't have an impact on this behavior
Really
Yeah I'd like to rec a little something to show you
But I'm not having the same issue at least
Not sure what copilot is doing for you there then. I cannot repro this with copilot enabled or disabled
I should have showed that first
C# is in prerelease as hinted when installing c# dev kit
c# dev kit is not
They're both prerelease, but dev kit doesn't matter here
The C# extension is what is providing completion
I'm trying to figure out if there's some VSCode setting that controls accepting completions on
"
The interesting options I found in my settins.json
I also have this
"editor.acceptSuggestionOnCommitCharacter": true
I will disable it and try againOh, that could very well be it
I have that off
Yup, that's it
Oh you can reproduce it now ?
This does still feel buggy to me though:
"
shouldn't be a commit character in an argument list
Please do file that bugOkay your help was precious I have a track now
I'm on azerty maybe that's related
Nope
And linux (x11)
That could be a x issue
We're saying that
"
is a character that should accept suggestions
We shouldn't be doing thatYeah indeed
Trust me. It's not a bug related to your environment
Okay
I'll link that issue here as soon as I wrote it, is it good for you ?
👍
(Just to be sure, I guess this is the window)
That's the one
Good news: it may already be about to be fixed
GitHub
Emulate suggestion mode in LSP completion by always soft-select by ...
Fix dotnet/vscode-csharp#5732
GitHub
[Completion] " as commit character · Issue #5988 · dotnet/vscode-cs...
Type: Bug Issue Description When using the C# extension and with the option "editor.acceptSuggestionOnCommitCharacter": true " seems to be incorrectly considered as a commit characte...
Oopsie I didn't see I can close it if you want
No worries
I have this issue as well fwiw
If this is a top-level file,
args
shows up because it's passed by defaultYeah it's related to the commit option, if you disable it you won't have this issue anymore
"editor.acceptSuggestionOnCommitCharacter": true
This one, if you don't need it you can put that to false
It's true by default
It will be fixed soon anyway
Oh but you're the ero from speedrun serv 👋Was this issue resolved? If so, run
/close
- otherwise I will mark this as stale and this post will be archived until there is new activity.