editorconfig / editorconfig-vscode

EditorConfig extension for Visual Studio Code
http://editorconfig.org/
MIT License
1.24k stars 119 forks source link

trim_trailing_whitespace = false not working #370

Open kevinhehehaha opened 2 months ago

kevinhehehaha commented 2 months ago

Please fill-in this template.

Delete the following condition if it doesn't apply to your case:

If the extension is not picking up the expected configuration for a file:

Issue

Visual Studio Code editorconfig-vscode
Version x.x.x x.x.x

Root .editorconfig File

root = true

[*]
indent_style = space
indent_size = 2

Are there any other relevant .editorconfig files in your project? Yes / No

Visual Studio Code Setting Default User Workspace
editor.insertSpaces true ____ ____
editor.tabSize 4 _ _
editor.trimAutoWhitespace true ____ ____
files.autoSave "off" "___" "___"
files.insertFinalNewline false _____ _____
files.trimTrailingWhitespace false _____ _____

File opened

./foo.js

Expected behavior

indent_size = 2

Actual behavior

indent_size = 4

Additional comments or steps to reproduce

abelcheung commented 1 day ago

I have same issue here, with trim_trailing_whitespace EditorConfig being ignored, when the similar vscode builtin setting @id:files.trimTrailingWhitespace (but for all files) is in effect. This is not just a cosmetic issue, because it can damage diff files.