2

My vscode editor is set to automatically add closing brackets/parenthesis but does not add them. This is a new issue that only recently began. Has anyone else experienced this issue with global vscode settings?

canaan seaton
  • 6,688
  • 4
  • 17
  • 25

1 Answers1

6

This may be caused by the new vscode extension GitHub Copilot.

Update your settings.json like the following...

// Must specify rule by language
"[typescript]": {
  "editor.autoClosingBrackets": "always"
}

This can become an issue as the new GitHub Copilot will override some settings in settings.json file. In order to take back control from the GitHub Copilot extension you must specify some rules like editor.autoClosingBrackets on a per lang basis.

canaan seaton
  • 6,688
  • 4
  • 17
  • 25
  • 3
    Please update your answer with the actual configuration you are using rather than a screen shot. – Bill_Stewart Jul 13 '21 at 20:15
  • I updated the original answer to reflect what I did to fix the issue. :) – canaan seaton Jul 14 '21 at 15:01
  • You can now change this for all languages in the UI Settings. Open `Settings` and search on `brackets`. The dropdown for `Auto Closing Brackets` has several options including `always` and `beforeWhitespace`. – JohnM Sep 16 '21 at 03:21