Search code examples
jsontypescriptvisual-studio-codegithub-copilot

VSCode not adding closing brackets with correct settings


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?


Solution

  • 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.