javavscode icon indicating copy to clipboard operation
javavscode copied to clipboard

Settings in .editorconfig are ignored

Open parfentjev opened this issue 3 months ago • 2 comments

Description

After installing the EditorConfig extension and applying the following configuration via .editorconfig:

root = true

[*]
end_of_line = lf
insert_final_newline = true

[*.{java,html,css,js}]
charset = utf-8
indent_style = space
indent_size = 2

I have noticed that Java code is still being formatted with four spaces instead of the specified two spaces.

Steps to Reproduce

  1. Install the EditorConfig extension.
  2. Apply the provided .editorconfig configuration.
  3. Open a Java file.
  4. Run the formatter and observe the indentation.

Expected Behavior

Java code should be formatted with two spaces as specified in the .editorconfig file.

Actual Behavior

Java code is formatted with four spaces.

Additional Information

It appears that javavscode does not offer any way to configure how the code is formatted, which is acceptable. However, it would be nice if it did not conflict with other widely used tools like the EditorConfig extension.

parfentjev avatar Aug 13 '25 17:08 parfentjev