Skip to content

Open files from Lazygit in active buffer instead of floating terminal in nvf #1346

@rxtsel

Description

@rxtsel

I have verified that this feature request has not been made before

  • I have checked the issues tab, and did not find a similar feature request. I understand that my issue will be closed if it is a duplicate.

Feature Type

Other, Update Request (Plugin/Nixpkgs)

Feature description

When using nvf with:

vim.terminal.toggleterm.lazygit.enable = true

LazyGit opens in a floating terminal by default. Pressing e on a file opens it inside the floating terminal buffer rather than in the active Neovim buffer.

Expected behavior: pressing e should open the file in the currently active buffer, similar to how LazyGit behaves in plain Neovim or in previous setups without toggleterm floats.

Current workaround: changing vim.terminal.toggleterm.lazygit.direction to "horizontal" or "vertical" allows e to open files in the main buffer, but this changes the LazyGit window layout.

Proposed solution: provide an option to open files from LazyGit in the active Neovim buffer even when using toggleterm floating windows.

This would allow users to retain the floating LazyGit terminal while opening files in their active buffer, restoring the previous workflow.

Alternatives

No response

Additional Context

Related lazygit.nvim issue: Allow opening files from lazy git as nvim buffer #22

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions