vscode: auto closing brackets not working on vscode 1.57
Does this issue occur when all extensions are disabled?: Yes/No
- VS Code Version: 1.57
- OS Version: ubuntu 20.04.2 LTS
Steps to Reproduce:
- open a js file on code
- type a opening bracket (
- expected result ()
- actually getting (
- bracket is not auto closing
About this issue
- Original URL
- State: closed
- Created 3 years ago
- Reactions: 111
- Comments: 47 (5 by maintainers)
This might be defined by an extension. Are you by any chance using copilot?
I had the same issue suddenly this morning, but I finally get this work by specify the language
But it’s still not work globally, only the language specified.

Copilot is defining these default language settings that can be overwritten only using language specific settings. They do that to workaround an issue in vscode tracked at https://github.com/microsoft/vscode/issues/125663 . Once we ship our next stable release (sometime this week), they will be free to remove that workaround. Until then you can disable the extension if you are not in the preview program yet or you can define the language specific setting e.g.:
I was running into this and it looks like it is the new CoPilot plugin that causes this to stop working. Just uninstall and you should be back to normal.
I had the same issue, but it went away after I disabled the Copilot extension.
I have it installed, but not working yet, because I’m not in the preview program yet.
Disabling copilot does the job
I also have this issue after installing copilot. Disabling it and reopening the vs code works for me.
I FOUND A SOLUTION!
go into settings.json and delete this:
and save, and it’s fixed!
i just install copilot and the problem happen, so just disable and i hope that will fix 👍
Yeah,
I can confirm that CoPilot did that for me. Anyway, for Javascript and Typescript I’ve used this setting:
}, "[typescript]": { "editor.autoClosingBrackets": "always" }, "[javascriptreact]": { "editor.autoClosingBrackets": "always" }, "[javascript]": { "editor.autoClosingBrackets": "always" }
An extension breaking a basic feature of editor and being silent about it does not look good.
doesn’t matter. if you have copilot (even not activated by GitHub) auto-closing brackets are not gonna work.
Encountered this issue as well. It stopped working suddenly, in the middle of coding session. Not working in JS and Python. Adding
"editor.autoClosingBrackets": "always"
globally does not solve the issue. Only language-specific settings work.I just updated to VS code 1.59 and then this happened, so I was worried. But it was indeed copilot, as soon as I uninstalled it it worked.
I hadn’t noticed right away because I’ve been learning svelte, and the problem with the brackets wasn’t there. I don’t know if it’s because of their recommended formatter, or if copilot simply doesn’t mess with
.svelte
files.Afterwards I reinstalled copilot, giving it a second chance, and set individual language specific settings in the
settings.json
file like everyone else, and I got my auto closing brackets back.The question is, will this be the only breaking feature?