Add Transient menus#214
Open
charjr wants to merge 1 commit into
Open
Conversation
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.
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. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Features
Main Menu
gdscript-menuA 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: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 pC-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-gdscriptConditionally 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 intogdscript-menu--). I've done this for two reasons: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-bufferif I want to switch buffer. I'd be curious to hear feedback on this one from other users.