editorconfig for Visual studio code

croraf picture croraf · Nov 17, 2017 · Viewed 33k times · Source

My project has .editorconfig file with:

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

I thought this will force my VS Code to use indent style space with 4 spaces.

I installed EditorConfig for vs code extension from the list of extensions.

But still nothing, my newly created files don't set automatically the configured space style. What is the problem?

Answer

croraf picture croraf · Feb 14, 2019

I think I found the solution. When I create the .editorconfig with rightclick on the folder structure sidebar in VSCode 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