noice.nvim
noice.nvim copied to clipboard
bug: crash during the second commit with NeoGit
Did you check docs and existing issues?
- [X] I have read all the noice.nvim docs
- [X] I have searched the existing issues of noice.nvim
- [X] I have searched the exsiting issues of plugins related to this issue
Neovim version (nvim -v)
0.9.0-dev-833+gb4c4c232b
Operating system/version
Linux 5.15.79.1-microsoft-standard-WSL2
Describe the bug
When trying to make a second commit during the same editing session, NeoVim just crashes. I've read the manual but couldn't find a way to set logs neither for Noice nor Neogit.
Steps To Reproduce
- Make first commit
- Edit some file, stage the changes (either with
gitsigns
orNeogit
is indifferent) - Make the commit
- NeoVim crashes
Expected Behavior
I should the commit made properly without crashing
Repro
-- DO NOT change the paths and don't remove the colorscheme
local root = vim.fn.fnamemodify('./.repro', ':p')
-- set stdpaths to use .repro
for _, name in ipairs({ 'config', 'data', 'state', 'cache' }) do
vim.env[('XDG_%s_HOME'):format(name:upper())] = root .. '/' .. name
end
-- bootstrap lazy
local lazypath = root .. '/plugins/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', lazypath })
end
vim.opt.runtimepath:prepend(lazypath)
-- install plugins
local plugins = {
'folke/tokyonight.nvim',
{
'folke/noice.nvim',
dependencies = {
-- if you lazy-load any plugin below, make sure to add proper `module="..."` entries
'MunifTanjim/nui.nvim',
-- OPTIONAL:
-- `nvim-notify` is only needed, if you want to use the notification view.
-- If not available, we use `mini` as the fallback
'rcarriga/nvim-notify',
},
config = function()
require('noice').setup()
end,
},
{
'TimUntersberger/neogit',
dependencies = {
'nvim-lua/plenary.nvim',
'sindrets/diffview.nvim',
},
config = function()
require('neogit').setup()
end,
},
-- add any other plugins here
}
require('lazy').setup(plugins, {
root = root .. '/plugins',
})
vim.cmd.colorscheme('tokyonight')
-- add anything else here
Somehow I managed to get the stack trace from Noice logs
Sat 28 Jan 2023 08:01:14 AM CET
vim/_meta.lua:0: Expected lua string
stack traceback:
[C]: in function 'pcall'
...local/share/nvim/lazy/noice.nvim/lua/noice/util/call.lua:144: in function <...local/share/nvim/lazy/noice.nvim/lua/noice/util/call.lua:143>
[C]: in function 'nvim_get_option_info'
vim/_meta.lua: in function '__index'
vim/_meta.lua: in function ''
vim/_meta.lua: in function '__index'
....local/share/nvim/lazy/noice.nvim/lua/noice/view/nui.lua:289: in function <....local/share/nvim/lazy/noice.nvim/lua/noice/view/nui.lua:276>
...
.../.local/share/nvim/lazy/noice.nvim/lua/noice/ui/init.lua:99: in function <.../.local/share/nvim/lazy/noice.nvim/lua/noice/ui/init.lua:74>
[C]: in function 'confirm'
...n/.local/share/nvim/lazy/neogit/lua/neogit/lib/input.lua:64: in function 'get_confirmation'
...im/lazy/neogit/lua/neogit/buffers/commit_editor/init.lua:50: in function <...im/lazy/neogit/lua/neogit/buffers/commit_editor/init.lua:46>
[C]: in function 'nvim_buf_delete'
.../.local/share/nvim/lazy/neogit/lua/neogit/lib/buffer.lua:102: in function 'close'
...im/lazy/neogit/lua/neogit/buffers/commit_editor/init.lua:70: in function 'cb'
.../.local/share/nvim/lazy/neogit/lua/neogit/lib/buffer.lua:352: in function <.../.local/share/nvim/lazy/neogit/lua/neogit/lib/buffer.lua:351>
...are/nvim/lazy/neogit/lua/neogit/lib/mappings_manager.lua:9: in function 'invoke'
[string ":lua"]:1: in main chunk
If you mean that Neovim crashes as in segfaults, then you need to get a proper stacktrace. Check the Neovim wiki on how to get that for your platform. Either way, segfaults are not caused by Noice. Most likely a bug in Neovim.