editorconfig for Visual studio code
You can also try this one, you can change to spaces if you like :)
root = true
[*]
end_of_line = lf
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true
indent_style = tab
indent_size = 2
[*.{js,txt,md,css,html,php,py,json,yml,sass,pug}]
indent_style = tab
indent_size = 2
[*.{diff,md}]
trim_trailing_whitespace = false
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:
try
root = true
[*.js]
indent_style = space
indent_size = 4
charset = utf-8