godotengine / godot-vscode-plugin

Godot development tools for VSCode
MIT License
1.53k stars 151 forks source link

"How to Guide" on setting up the GDScript Formatter #687

Open Luzzotica opened 1 month ago

Luzzotica commented 1 month ago

Godot version

4.3.0.beta1

VS Code version

1.91.1

Godot Tools VS Code extension version

2.1.0

System information

MacOS Sonoma 14.5

Problem statement

I am trying to figure out how to enable the GDScript autoformatter (as I see there is one), but cannot find any instructions on how to do so.

Proposed solution

Create a simple step by step to enable it.

DaelonSuzuka commented 1 month ago

I don't really understand what you're looking for. You just hit ctrl + shift + P, type "format document" and hit enter.

VSCode has a format-on-save feature that you can enable, but i personally hate that so I added a keybind that executes the command when I hit a certain combination.

Luzzotica commented 1 month ago

I guess I want it to happen automatically on save.

How might I achieve that?

DaelonSuzuka commented 1 month ago

press ctrl + comma -> type the word "format" -> behold