vscode-csharp icon indicating copy to clipboard operation
vscode-csharp copied to clipboard

Using `Suggestion: Move type to (Type).cs` will changes indent

Open Luminash opened this issue 7 months ago • 2 comments

Type: Bug

Issue Description

I found that when I use Suggestion: Move type to (Type).cs, this will cause indent changes.

Steps to Reproduce

  1. Create a file which contain two classes, with indedt using 4 space, for example:
public record ThisFile()
{
    enum ENUM
    {
        TEST
    }
}

public record Test()
{
    enum T
    {
        ABC
    }
}
  1. Use code suggesion Move type to (TypeName).cs to move one of the class to the other file
  2. Open the file with the moved class, you can see that the indent become Tab instead of Space

Expected Behavior

When using this suggestion to move, I expect that indent won't change, or at least, the moved file should use editor config as rule to reformat itslef

Actual Behavior

When using space as indent, currently it will become Tab instead.

Luminash avatar Mar 19 '25 01:03 Luminash