Neogit doesn't respond to subcomands
kuznetsss opened this issue · comments
Sergey Kuznetsov commented
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
test
and 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
:Neogit
and stage all the filess
and commitcc
them - 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
c
inside 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,
}
)