Skip to content

Discussion: Implement the formatter as a GDExtension #282

Description

@khellste

Now that the project no longer depends on Topiary, there is less reason for the formatter to be implemented as an external binary.

I propose a full rewrite in GDExtension/C++, which would have the following advantages:

  • The formatter can be distributed as a single Godot addon. No need to download and install a separate binary.
  • It runs natively in the Godot editor without shelling out to a separate process. (Though we should still support external editors using godot --headless -s some_cli_wrapper.gd.)
  • Formatter primitives (like perhaps the GDScript AST) can be exposed to @tools in the Godot scripting environment, allowing users to more easily build custom tooling on top of the formatter.

I realize it's a big undertaking, but I think having the formatter as a standalone Godot addon would be worth it. I'm willing to take a stab at it if others on the project see value in it too.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions