Neogit doesn't respond to subcomands
Nobody has claimed this yet.
- Dominant language
- Lua
- Stars
- 5.6k
- Forks
- 357
- Avg merge
- 15h 47m
- Merged PRs (30d)
- 2
Description
Description
Thanks for the amazing plugin!
I have an issue that Neogit stops to respond to subcommands after window with git log appears.
Neovim version
NVIM v0.10.0
Build type: Release
LuaJIT 2.1.1693350652
Operating system and version
macOS 14.5
Steps to reproduce
- Create a directory
testand cd into it:
mkdir test
cd test
- Init git repo
git init
- Create simple precommit hook
.git/hooks/pre-commit:
#!/bin/sh
sleep 3
and make the hook executable.
5. Create file minimal.lua (see minimal config section).
7. Open nvim using the config:
NVIM_APP=nvim_test nvim -u ./minimal.lua
- Inside nvim open Neogit using
:Neogitand stage all the filessand commitccthem - There will be an error in floating window showing git log
hint: Waiting for your editor to close the file... Error detected while processing command line:
E5108: Error executing lua Vim(lua):E5108: Error executing lua .../.local/share/nvim/lazy/neogit/lua/neogit/lib/buffer.lua:266: Cannot split a floating window
stack traceback:
[C]: in function 'nvim_open_win'
.../.local/share/nvim/lazy/neogit/lua/neogit/lib/buffer.lua:266: in function 'show'
.../.local/share/nvim/lazy/neogit/lua/neogit/lib/buffer.lua:557: in function 'create'
...hare/nvim/lazy/neogit/lua/neogit/buffers/editor/init.lua:76: in function 'open'
...rgey/.local/share/nvim/lazy/neogit/lua/neogit/client.lua:122: in function 'editor'
[string ":lua"]:1: in main chunk
stack traceback:
[C]: in function 'rpcrequest'
...gey/.local/share/nvim/lazy/neogit/lua/neogit/lib/rpc.lua:37: in function 'send_cmd'
...rgey/.local/share/nvim/lazy/neogit/lua/neogit/client.lua:75: in function 'client'
- After that Neogit doesn't respond to any subcommand, for example, after pressing
cinside Neogit window to commit, split window with commit subcommands hint opens but nothing works there.
Expected behavior
No error and Neogit is responsive.
Actual behavior
There is an error in floating git log window when I try to commit:
hint: Waiting for your editor to close the file... Error detected while processing command line:
E5108: Error executing lua Vim(lua):E5108: Error executing lua .../.local/share/nvim/lazy/neogit/lua/neogit/lib/buffer.lua:266: Cannot split a floating window
stack traceback:
[C]: in function 'nvim_open_win'
.../.local/share/nvim/lazy/neogit/lua/neogit/lib/buffer.lua:266: in function 'show'
.../.local/share/nvim/lazy/neogit/lua/neogit/lib/buffer.lua:557: in function 'create'
...hare/nvim/lazy/neogit/lua/neogit/buffers/editor/init.lua:76: in function 'open'
...rgey/.local/share/nvim/lazy/neogit/lua/neogit/client.lua:122: in function 'editor'
[string ":lua"]:1: in main chunk
stack traceback:
[C]: in function 'rpcrequest'
...gey/.local/share/nvim/lazy/neogit/lua/neogit/lib/rpc.lua:37: in function 'send_cmd'
...rgey/.local/share/nvim/lazy/neogit/lua/neogit/client.lua:75: in function 'client'
And Neogit becomes not responsive to subcommands.
Minimal config
local lazypath = vim.fn.stdpath 'data' .. '/lazy/lazy.nvim'
if not vim.loop.fs_stat(lazypath) then
vim.fn.system {
'git',
'clone',
'--filter=blob:none',
'https://github.com/folke/lazy.nvim.git',
'--branch=stable', -- latest stable release
lazypath,
}
end
vim.opt.rtp:prepend(lazypath)
require('lazy').setup({
'NeogitOrg/neogit',
dependencies = {
'nvim-lua/plenary.nvim', -- required
'nvim-telescope/telescope.nvim', -- optional
'sindrets/diffview.nvim', -- optional
},
config = function()
require('neogit').setup {
commit_editor = {
kind = 'split',
},
}
end,
}
)
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce the issue with the provided minimal config, Neovim v0.10.0, macOS 14.5, and a three-second pre-commit hook. Start at lua/neogit/lib/buffer.lua:266 and follow the editor flow through buffers/editor/init.lua, focusing on the reported “Cannot split a floating window” error. Done means committing no longer raises the error and Neogit responds to subsequent subcommands.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- git, lua
- Domain
- cli, devtools
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 35/100