visual-studio-codewhitespaceeditorconfig

EditorConfig for Visual Studio Code


My project has .editorconfig file with:

[*.{js}]
charset = utf-8
indent_style = space
indent_size = 4

I thought this will force my Visual Studio Code to use indent style space with four spaces.

I installed the EditorConfig for Visual Studio Code extension from the list of extensions.

But still there isn't anything. My newly created files don't set automatically to the configured space style. What is the problem?


Solution

  • I think I found the solution. When I create the .editorconfig file with right-click on the folder structure sidebar in Visual Studio Code and select Generate .editorconfig (thus letting the plugin to create it), it works.

    Click on the empty area below the files:

    Enter image description here