Skip to content

Add Transient menus#214

Open
charjr wants to merge 1 commit into
godotengine:masterfrom
charjr:transient-menus
Open

Add Transient menus#214
charjr wants to merge 1 commit into
godotengine:masterfrom
charjr:transient-menus

Conversation

@charjr

@charjr charjr commented Jun 20, 2026

Copy link
Copy Markdown
Contributor

Features

Main Menu gdscript-menu

Screenshot From 2026-06-20 08-22-01

A main entry point that we could assign to a key, removing the need to memorise complex keychords. Think of it like a bespoke which-key-mode.

Godot Engine Menu gdscript-menu-godot:

Screenshot From 2026-06-20 08-22-13

Wrapping a CLI tool is where Transient really shines, if you've used Magit then the way this menu works should be familiar.

Built In History

I've set up this menu to use transient's built-in history: navigatable with C-x p C-x n.

Saves Last Used Flags

Each time you open the menu, it starts with the same flags you used last. This persists across emacs sessions.

GDScript Menu gdscript-menu-gdscript

Screenshot From 2026-06-20 08-22-24

Conditionally disable GDFormat commands when executable is missing

We could instead hide them completely, but that would make the feature less discoverable.

Additional Notes

Shorthands

I used a Shorthand gd// for transient-specific code. (Emacs automatically translates this into gdscript-menu--). I've done this for two reasons:

  1. It's concise
  2. To discourage external use of internal details.

Missing Menu options

Script

This option has been left out as it has confused users in the past, including me. This could be reconsidered if we make it clear when it will work (via conditional disabling for instance)

Switch to Godot

This may be a personal taste, but I don't use this option. I just use the familiar switch-to-buffer if I want to switch buffer. I'd be curious to hear feedback on this one from other users.

3 menus currently added:
- `gdscript-menu`: the main menu that other menus are accessible from.
- `gdscript-menu-godot`: for anything related to the Godot executable.
- `gdscript-menu-gdscript`: for anything related to GDScript.

History is built-in to transient by including a unique `:history-key`.
History is navigatable with `C-x p` `C-x n`.
History is setup for `gdscript-menu-godot`.
The other menus have no configuration options, so have no use for it.

GDFormat commands are greyed out unless the executable is found.
There is also the option to make it completely hidden,
but that would make the commands less discoverable.

I used a shorthand variable `gd//` for transient-specific code.
Using a shorthand here has two advantages.
1. Concise code
2. Discourage external use of internal details.
@charjr

charjr commented Jun 20, 2026

Copy link
Copy Markdown
Contributor Author

I have not removed any hydra code yet as I have not built a replacement for the debug hydra yet. But looking at #211, it seems like the debugger might need some fixes before attempting to overhaul it.

I'm pushing this now because, personally I believe these menus surpass the existing hydra for launching godot. It would be good to get some feedback on where I may be wrong.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant