#VSCode autocomplete bug
1 messages · Page 1 of 1 (latest)
I've seen this post:
https://www.reddit.com/r/Unity3D/comments/1k7vcbt/vscode_weird_autocomplete/
Setup:
- Unity Editor 6.3 LTS (6000.3.7f1)
- VSCode no updates available.
- .NET SDK 10.0.102 (x64)
- C# Dev Kit installed
- I don't have Unity Code Snippets installed.
I tried:
- setting
"omnisharp.useModernNet": true(edit: removed typo) - Regenrating project files.
- ensuring I opened project from the unity project root.
From consulting my LLM, I've tried:
- a bunch of nonsense
- setting
"editor.suggest.insertMode": "replace"
Sadly non of the things I've tried so far has fixed the bug.
You mention "omnisharp.useModerNet": true but the option is "omnisharp.useModernNet": true
Typo. My bad. I have set - "omnisharp.useModernNet": true. and it didn't solve the bug.
Do you get the same autocomplete behavior?
Ah, okay, just making sure you did try the correct syntax
This as well as the first { of a function not being moved to the next line made me ditch vs code for VS ages ago
Seems to work just fine for me.
thats good, i tried last over 1 year ago and I dont wish to move back
I always use VS if possible
I used to compare VS Code with VS on every new VS release and VS consistently performed worse in every way (startup time, intellisense responsiveness, memory usage, etc). Haven't done that for VS 2026 though, because at this point I wouldn't consider moving to VS anymore.
But OP isn't really asking for a comparison anyways.
Thats true but its worth noting that omnisharp is the old .net plugin so who knows whats different feature wise between that and the new one
may also explain things working better now
Yeah if OP has C# Dev Kit installed, I'm not sure why they would be using O#.
may be why it didnt get fixed because the setting is not even used
is omnisharp even its own extension? i couldn't find it
there are some options in c# prefixed with "omnisharp"
Pretty sure the C# extension (not the C# Dev Kit extension) by default doesn't use O#, you have to explicitly turn it on to make it use O#, which I don't see why you would ever do that.
Actually if you have C# Dev Kit installed, turning on O# doesn't even work anyways.
Regardless, fairly certain all the options related to O# is just red herring, it shouldn't affect anything.
I just checked my VS Code settings related to C#, I don't have anything out of the ordinary set.
I would recommend OP try with a clean VS Code profile with just C# + C# Dev Kit + Unity extension installed, and see if the problem also exists there. If not, then it would suggest the problem is with some other extension you are using.
hm i can't replicate this issue right now, though ive definitely encountered it in the past. i don't remember doing anything specifically to fix it, and my c# settings are all default
It happened some years ago with one bad C# extension release and they fixed it afterwards.
That's the only time I remember this happening to me.
huh, could be that
@peak salmon make sure your vscode and extensions are up to date
Oh right, I just assumed OP is using latest.
Does it also work if you capitalize the O and T?
Yep.
I've used VS Code in the past for programming in other languages. I didn't like the initial config with VS. So I want to try out a setup with VS Code and if I feel limited I'll take some time to setup VS.
That being said I'm new to C# and Unity.
When I type everything in lowercase it works.
If changing settings etc. doesn't work, I could just work on getting capitalization out of my muscle memory.
I was lowkey hoping a setup with VS Code + Unity will be popular enough that more people ran into the problem and have a setting/fix that I'm just not aware of^^.
Have you tried what I've suggested to debug the issue?
But also check your extension version as suggested by @hasty needle.
I'm working on it now.
So far I've been using:
Visual Studio Code - Version: 1.109.1
Extensions:
C# - Version: 2.120.3
C# Dev Kit - Version: 2.10.3
Unity - Version: 1.2.1
Autocomplete works now. I've created a clean profile and only have the following extensions:
- .NET Install Tool
- C#
- C# Dev Kit
- Unity
- (disabled) GitHub Copilot Chat
On the profile where it doesn't work I have additionally:
- DotENV
- GitHub Copilot Chat
- WSL
I'll test if any of the extensions are the cause. If not then I'll assume its some Profile setting and I'll have to figure out a way to find which one it is^^.
VS Code has an extension bisect to help you isolate the issue if you've got tons of extensions, but it seems like you don't have that many so it's probably faster to just try one by one.
It does seem odd that it works for you with lower case typing but not upper case though.
I can't seem to get it to work again.
I've completely reinstalled VS Code and removed all personal settings.
I've tried reducing the amount of AI interference.
Here is my profiles settings.json
{
"chat.agent.enabled": false,
"chat.disableAIFeatures": true,
"editor.acceptSuggestionOnCommitCharacter": false,
"editor.acceptSuggestionOnEnter": "off",
"editor.inlineSuggest.enabled": false,
"dotnetAcquisitionExtension.enableTelemetry": false,
"telemetry.editStats.enabled": false,
"telemetry.feedback.enabled": false,
"workbench.startupEditor": "none"
}
I think its also weird that it behaves differently when i press tab to auto complete right away vs. manually getting suggestions via ctrl + space.
Not typing void or not capitalizing any letter also seem to work.
I was able to reproduce it. It seems like it happens if you leave this option on default, but I have it set to private hence why I wasn't seeing it.
It works! Thank you for helping me ❤️
Well it fixed the autocomplete for "void OnTrig..." but it didn't fix it for "private void OnTrig...".