Check out our latest project ✨ OpenChapter.io: free ebooks the way its meant to be 📖

Beautify Code on Save

An asset by nuevocharrua
The page banner background of a mountain and forest
Beautify Code on Save hero image

Quick Information

0 ratings
Beautify Code on Save icon image
nuevocharrua
Beautify Code on Save

Automatically formats and lints GDScript files on save using gdformat and gdlint.

Supported Engine Version
4.3
Version String
1.0.1
License Version
MIT
Support Level
community
Modified Date
23 days ago
Git URL
Issue URL

Beautify Code on Save

A Godot 4 plugin that automatically formats and lints your GDScript files when saving. Format on Save logo

Features

  • Automatic code formatting using gdformat when saving files
  • Code style checking with gdlint after formatting
  • Maintains cursor and scroll position
  • Configurable paths for both tools
  • Automatic tool path detection
  • Clean error reporting

Prerequisites

  1. You need to have gdtoolkit installed. For installation instructions, visit: https://github.com/Scony/godot-gdscript-toolkit

  2. Make sure both gdformat and gdlint are available in your system after installation.

Installation

  1. Clone this repository (or download it) into your project's addons folder:
cd your-project
git clone https://github.com/nuevocharrua/beautify-code-on-save addons/beautify_code_on_save
  1. Enable the plugin in Godot:
    • Go to Project -> Project Settings -> Plugins
    • Find "Beautify Code on Save" in the list
    • Check the "Enable" checkbox

Configuration

The plugin will try to automatically detect the paths to gdformat and gdlint. If it cannot find them, you can configure them manually:

  1. Go to Editor -> Editor Settings
  2. Scroll down to the "Beautify Code on Save" section
  3. Set the paths for both tools

Common paths are:

  • Linux/macOS: /usr/local/bin/gdformat or ~/.local/bin/gdformat
  • Windows: Usually in %APPDATA%\Python\Scripts\gdformat.exe

Usage

Just save your GDScript files (Ctrl+S/Cmd+S) and they will be automatically formatted and checked!

License

MIT License - See LICENSE file for details

Automatically formats and lints GDScript files on save using gdformat and gdlint.

Reviews

0 ratings

Your Rating

Headline must be at least 3 characters but not more than 50
Review must be at least 5 characters but not more than 500
Please sign in to add a review

Quick Information

0 ratings
Beautify Code on Save icon image
nuevocharrua
Beautify Code on Save

Automatically formats and lints GDScript files on save using gdformat and gdlint.

Supported Engine Version
4.3
Version String
1.0.1
License Version
MIT
Support Level
community
Modified Date
23 days ago
Git URL
Issue URL

Open Source

Released under the AGPLv3 license

Plug and Play

Browse assets directly from Godot

Community Driven

Created by developers for developers