godotengine / godot-vscode-plugin

Godot development tools for VSCode
MIT License
1.54k stars 163 forks source link

Default indent style changes when changing / copying blocks of text between files #615

Open HankyAd opened 7 months ago

HankyAd commented 7 months ago

Godot version

4.2

VS Code version

1.87.0

Godot Tools VS Code extension version

2.0.0

System information

Windows 11

Issue description

I'm noticing regularly issues like: image

When I see this, i'm noticing that at some point VSCode has swapped from TAB indentation to SPACE indentation image

Godot's best practices infer using tabs: https://docs.godotengine.org/en/stable/tutorials/scripting/gdscript/gdscript_styleguide.html#formatting

Steps to reproduce

Unsure of exact steps, but it's happening about once per hour for me

I'm noticing it mostly changing when pasting code, but I can't say that for sure

I've since attempted to disable any form of formatting from VSCode to see if it will remedy. I will update accordingly if the issue stops occurring over the next few hours of programming

DaelonSuzuka commented 7 months ago

I don't see how that's related to this extension because it happens to me in JavaScript/TypeScript constantly.

You can try disabling 'editor.detectIndentationandeditor.autoIndent` settings, I guess?