Skip to content

Conversation

@mityu
Copy link

@mityu mityu commented Oct 19, 2025

This PR adds a source to get a list of gin actions from the current gin buffer, and an action to execute a selected action on the current gin buffer.

This is example screenshot of gin-action picker invoked on the gin-log buffer in this PR's branch.
image

And configuration example:

import { ginAction } from "@vim-fall/extra/source/gin-action";
import { defaultGinActionExecuteActions } from "@vim-fall/extra/action/gin-action-execute";

definePickerFromSource("gin-action", ginAction, {
  previewers: [],
  actions: {
    ...defaultGinActionExecuteActions,
  },
  defaultAction: "gin-action-execute",
});

Note that in the current implementation, the gin-action-execute doesn't support selectedItems parameter. The reason is that we don't know which order we should invoke actions when multiple actions are given because the order of git operations often matter.
If you have another idea or advices, please let me know.

@mityu
Copy link
Author

mityu commented Oct 20, 2025

I came up with the idea that the behavior/limitations of this source should follow those of the built-in action selector's. I'll check it.

@mityu
Copy link
Author

mityu commented Oct 25, 2025

It seems that the default action picker just ignores the selectedItems property, so I think it's ok that gin-action-execute only checks item property.

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