jesseduffield / jesseduffield/lazygit
Consider making lazygit scriptable with an internal API
- Dominant language
- Go
- Stars
- 82.4k
- Forks
- 3k
- Avg merge
- 2d 18h
- Merged PRs (30d)
- 19
Description
Lazygit can be customized by defining custom commands, but all these can do is launch external programs or scripts.
It would be nice if custom commands could trigger scripts (probably in Lua) that have access to an internal API so that they can trigger things in lazygit. Examples for such things are
- focus a view
- select an item
- invoke a command
- switch to another repo
- change the value of a user config
Providing Lua bindings seems possible using either https://github.com/Shopify/go-lua or https://github.com/yuin/gopher-lua.
This is probably a huge task, there are tons of questions to be answered, and I'm not planning to work on this any time soon. Just putting this here so that we can link to it from other issues, for which this could be a solution.
Contributor guide
Assessment
This issue has not been assessed yet.