Let plugins contribute menu entries (and optionally replace built-in ones) #3183
Replies: 3 comments
|
See https://github.com/BjoernSchotte/herdr-worktree-picker for the plugin |
|
I went and read the 0.8.2 source to answer my own question about
That makes the request a bigger ask than I assumed when I wrote the post, so treat it accordingly. Not asking for a patch, just closing the loop on the question I raised. |
|
+1, with a case for the global menu specifically. I want to stop the server from the UI. Since |
Uh oh!
There was an error while loading. Please reload this page.
Herdr is mouse-first by design — the docs open with "click panes, drag borders, split and switch from right-click menus". But plugin actions are unreachable that way. As far as I can tell from the docs, an action can only be triggered through
[[keys.command]] type = "plugin_action",herdr plugin action invoke, or a link handler. Nothing surfaces it in a menu.So a plugin is invisible to exactly the users Herdr optimises for.
Concrete case: I wrote a small worktree picker, because
New worktreepre-fills a generated name (worktree-rapid-river-6486) and there is no setting for that. On the keyboard it works well — I put it onprefix+shift+g. But right-clicking a Git workspace row still opens the built-in prompt, and there is no way to point that entry somewhere else, or to add mine next to it.What I'd like:
For (2) the obvious worry is plugins silently hijacking the UI — the marketplace is unreviewed, and that would be a real trust problem. So I'd expect the manifest only to declare the capability and the user to enable it in
config.toml, the same way keybindings already work: the plugin offers, the user decides.One question while I'm here:
contexts = ["workspace"]appears in the manifest examples but is never explained anywhere in the docs. Is it already meant for something like this, or does it only gate applicability?Prior art for the demand:
herdr-command-paletteexists purely to make plugin actions findable. That gap seems worth closing in core.All reactions