Search code examples
visual-studioautocompletevisual-studio-2022intellisense

Disable Autocomplete on Open Parenthesis in Visual Studio 2022


Unfortunately, I'm forced to use Visual Studio 2022 for work, but I'm having trouble disabling this error completion behavior for C# (or any other language).

When I'm typing a call to a function I haven't created yet, right as I open the parenthesis to add in the arguments, VS decides that, actually, I made a mistake and literally replaces the function name I wrote, with the one it thinks I want to write. Extremely annoying and unwanted behavior.

i.e.

AddParameter(
// as soon as I open the parenthesis AddParameter gets replaced, and I need to Ctrl+Z, or retype it.

How do I turn this off? How do I stop Visual Studio from automatically "fixing", "autocompleting" anything unless I specifically ask it to???? I don't want Visual Studio to change any of my code just by typing regular characters like a parenthesis or semicolon.

I already turned off as many autocomplete features as I could find (including autocomplete on semicolon), but this one evades me.

I want to disable this feature. I've looked over all the settings and beneath the 1290381023812 billion editor options, I was not able to find this.


Solution

  • You can use the option to change the IntelliSense completion mode: Edit > IntelliSense > Switch between automatic and tab-only IntelliSense completion or shortcut: Ctrl+Alt+Space. In suggestion mode, only the text you type is inserted into the code.

    Or try to disable Automatic brace completion via:

    Tools -> Options -> Text Editor -> C# -> Automatic brace completion