sentiment.nvim
sentiment.nvim copied to clipboard
Error: Attempt to index a nil value
Error executing vim.schedule lua callback: ...re/nvim/lazy/sentiment.nvim/lua/sentiment/ui/Portion.lua:69: attempt to index a nil value
stack traceback:
...re/nvim/lazy/sentiment.nvim/lua/sentiment/ui/Portion.lua:69: in function 'get_current_char'
...ocal/share/nvim/lazy/sentiment.nvim/lua/sentiment/ui.lua:64: in function 'find_pair'
...ocal/share/nvim/lazy/sentiment.nvim/lua/sentiment/ui.lua:143: in function ''
vim/_editor.lua: in function ''
vim/_editor.lua: in function <vim/_editor.lua:0>
I've found this bug for one year, but I can never reproduce it stably.
Error executing vim.schedule lua callback: ...re/nvim/lazy/sentiment.nvim/lua/sentiment/ui/Portion.lua:69: attempt to index a nil value
stack traceback:
...re/nvim/lazy/sentiment.nvim/lua/sentiment/ui/Portion.lua:69: in function 'get_current_char'
...ocal/share/nvim/lazy/sentiment.nvim/lua/sentiment/ui.lua:64: in function 'find_pair'
...ocal/share/nvim/lazy/sentiment.nvim/lua/sentiment/ui.lua:143: in function ''
vim/_editor.lua: in function ''
vim/_editor.lua: in function <vim/_editor.lua:0>
@ofseed same bug here, but i can stably reproduce it:
- prepare 2 files:
debug.lua
:
vim.opt.splitkeep = 'topline'
-- plugin
local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim"
if not (vim.uv or 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(
{
{
'utilyre/sentiment.nvim',
init = function()
vim.g.loaded_matchparen = 1
vim.opt.showmatch = false
end,
config = function()
require('sentiment').setup({
included_modes = {
n = true,
i = true,
},
delay = 0,
})
end,
},
},
{
}
)
dwm.c
:
{
some text
}
- run command
nvim -u debug.lua dwm.c
- after opening the file
dwm.c
, press j to move down by 1 line - press
:h<CR>
to open the help buffer - error
note that after commenting out vim.opt.splitkeep = 'topline'
, this error won't happen