Skip to content

Add callbacks to run functions when LazyGit opens/closes #74

Open
@fnune

Description

@fnune

I use LazyGit's default keybindings, where <space> will stage/unstage things. When writing a quick commit message inside LazyGit, one needs to use the <space> key for spaces.

Here's the problem: I have my leader key set to <space>, and apparently that still counts when the LazyGit window is open. This has one big disadvantage: any time I press <space> inside LazyGit (and I do that often), Neovim needs to wait its timeoutlen before it forwards the keypress. So every time I e.g. want to stage/unstage something, I need to wait timeoutlen or press some other key to short-cut it. When writing a commit message, every time I add a space, I need to wait timeoutlen.

I wonder if you've come across this or know of a way to solve this. One idea I had was in the title of this issue: if lazygit.nvim provided on-open and on-close callbacks, I could set <leader> to something else while LazyGit is open, and then reset it once it closes.

Thanks for your plugin <3

PS: I tried using Plenary to render the window, and LazyGit behaved the same.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions