racz16 / WebGL-GLSL-Editor

WebGL GLSL shader editor extension for Visual Studio Code.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Customizing the code formater

Pavinati opened this issue · comments

At the moment the code if formatted with a indent size of 4 spaces. Is it possible to change it to 2?
It would be best if the formatter would follow what's written in the .editorconfig file, for example:

[*]
indent_style = space
indent_size = 2
max_line_length = 120

According to the EditorConfig website, there are IDEs that support EditorConfig by default, however, VS Code is not one of them. Luckily there is an official EditorConfig extension for VS Code that solves the problem. Currently, the following EditorConfig properties work with my extension: indent_style, indent_size and tab_width. The property max_line_length is not supported, but if you have long function declarations or conditions, my extension allow you to break those lines.

Ok, so the extension refers to VS Code settings. I've seen other extension reading the config file on their own and i assumed it was the same here. Thanks for the info!