Search code examples
indentationvisual-studio-codeauto-indent

How can I change JavaScript Indentation on VSCode?


I want to do indentation like this. (Arrays are not listed on one line, but on two lines.)

enter image description here

But in my VSCode, it does not indent like the picture below.

enter image description here

How do I set it up? The language is JavaScript.


Solution

  • Go to user settings (by Ctrl + ,) and search for editor.wrappingIndent. Change the value to indent or deepIndent.