Coder Social home page Coder Social logo

daylily-zeleen / gdscript-formatter Goto Github PK

View Code? Open in Web Editor NEW
16.0 1.0 3.0 205 KB

An addons for formatting GDScript.

License: MIT License

GDScript 100.00%
addon formatter formatter-plugin gdscript gdscript-language godot plugin pip python gdformat

gdscript-formatter's Introduction

GDScript-Formatter

icon

An addons of Godot Editor(4.x) for formatting GDScript.

Feature:

  1. Install/Update "gdtoolkit": Project-> Tool-> GDScript Formatter: Install/Update gdtoolkit
  2. Formatting:
    • By shortcut, default is: Shift+Alt+F
    • By tool menue item: Project-> Tool-> GDScript Formatter: Format script
    • By Command palette: pop up cammand palette (default by Ctrl+Shift+P), and comfire command "Format GDScript".
  3. Format on save: default is disabled, turn on it by changing preference (refer below for more detail).
  4. Preference:
    • You can modify shortcut and formatting preference by editing resource which are localed at "res://addons/gdscript_formatter/".
    • You can change gdformat and pip command by editing "res://addons/gdscript_formatter/format_preference.tres" (if these commands can't be found but are installed).

Requirements:

  1. For formatting: "gdtoolkit"
  2. For install/update "gdtoolkit": "pip"

Please ensure these requirements can be found in your environment.

gdscript-formatter's People

Contributors

daylily-zeleen avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

Forkers

hengle r2d2m

gdscript-formatter's Issues

No commands registered

Hi!

I am working on Godot 4.2.1 stable, and I downloaded your formatter plugin from the AssetLib (ver 0.0.4). After enabling it in the Project Settings > Plugins, there's no command as described in the README file showing up in the command palette nor in the menu Project > Tools. Moreover, when trying to disable the plugin, it prints this error message below:

The Command 'GDScript Formatter/Format GDScript' doesn't exists. Unable to remove it.

Format on save is not working on 4.2.1

If "Format on save" is enabled in the preferences, the code is not formatted on save and the following message "Format on save failed: due to engine bug. Please report an issue." is displayed in the output window.

Tested on Godot 4.2.1 standard version.

Note that the "Format on Save" plugin work well (no issue), and it can be used in replacement of the same feature of this plugin.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.