VSCode not auto closing parenthesis in JavaScript files

Viewed 266

I am using VSCode for coding my projects but while it adds parenthesis and curly braces in other types of files it doesn't auto adds in js files or JSX files

see here: https://i.stack.imgur.com/Okl3d.gif

I have researched for it and I found that I need to change the Editor: Auto closing Brackets settings and I have set it to languageDefined but still it is not auto-closing the parenthesis

https://i.stack.imgur.com/eLOtJ.png

Please answer how to fix that

3 Answers

Actually, this is an issue defined by an extension... are you, by any chance, using copilot?

go to settings and edit settings.json

 "editor.autoClosingBrackets": "always",
  "[javascript]": {
    "editor.autoClosingBrackets": "languageDefined"
  }, 
Related