GDScript Formatter is a fast code formatter that formats your GDScript files in milliseconds. This addon integrates the formatter directly into Godot 4, so you can keep your code clean and consistent without leaving the editor.
Note: there's currently no automated way to update the add-on on this platform. To get the latest version of the addon, you can use the Asset Library from within Godot or go to the GDScript formatter addon download on our website.
What it does
The formatter handles all the essential formatting work for you: consistent spacing and indentation, proper vertical spacing between functions and classes, and clean, readable code structure. Everything follows the official GDScript style guide automatically.
The formatter respects how you write the code when it comes to multi-line formatting. If you want to keep an array or function call on one line, it stays on one line. If you break it across multiple lines, the formatter respects that choice and makes sure the spacing and indentation look consistent.
Key features
- Fast formatting: The formatter works nearly instantly, even on slower computers.
- Code reordering: Use the reorder code command to automatically reorganize your script according to the style guide. It puts signals first, then variables, then built-in Godot methods like
_ready()and_process(), then your public methods, and finally private methods and inner classes. - Format on save: Enable this option to automatically format your scripts every time you save. Your code stays tidy without you having to think about it.
Detailed guide
For a complete guide on how to configure and use the addon, visit the documentation: GDScript Formatter: Godot 4 user manual
Changelog for version 0.18.2
No changelog provided for this version.
Reviews (4)
An essential addon
Very good, better than most formatters when it comes to following the styleguide. Thanks GDQuest!
A proper addon useful for coding tasks in the engine
Very fast and effective, just a nice quality of life addon.
Login to write a review.