benbrastmckie / .config

NeoVim configuration optimized for writing in LaTeX
318 stars 251 forks source link

Errors with indent-blankline.nvim #122

Closed rafisics closed 5 months ago

rafisics commented 5 months ago

Initially, I thought the issue is causing only while writing math or using snippets (https://github.com/benbrastmckie/.config/issues/119), but the same errors sometimes occur even when I just scroll through my tex file with j, k, <up>, <down> keys.

Error detected while processing CursorMoved Autocommands for "*":
Error executing lua callback: ...l/share/nvim/lazy/indent-blankline.nvim/lua/ibl/init.lua:478: invalid key: virt_text_repeat_linebreak
stack traceback:
        [C]: in function 'nvim_buf_set_extmark'
        ...l/share/nvim/lazy/indent-blankline.nvim/lua/ibl/init.lua:478: in function 'refresh'
        ...l/share/nvim/lazy/indent-blankline.nvim/lua/ibl/init.lua:128: in function 'debounced_refresh'
        ...l/share/nvim/lazy/indent-blankline.nvim/lua/ibl/init.lua:144: in function 'debounced_refresh'
        ...are/nvim/lazy/indent-blankline.nvim/lua/ibl/autocmds.lua:27: in function <...are/nvim/lazy/indent-blankline.nvim/lua/ibl/autocmds.lua:26>
Press ENTER or type command to continue

Screenshot from 2024-04-10 23-25-37

_I shared these errors here: https://github.com/benbrastmckie/.config/issues/119#issue-2216420695 and (https://github.com/benbrastmckie/.config/issues/119#issuecomment-204814501_9._

Removing the indent-blankline.lua from the plugins directory helps me avoid the errors for now. But I would like to know what's exactly causing the problem and how to fix it.

benbrastmckie commented 5 months ago

If you run nvim --version in the terminal, what is the result?

rafisics commented 5 months ago

nvim --version gives:

NVIM v0.10.0-dev-591+g42f9573e5
Build type: RelWithDebInfo
LuaJIT 2.1.0-beta3
Compilation: /usr/bin/cc -O2 -g -Og -g -Wall -Wextra -pedantic -Wno-unused-parameter -Wstrict-prototypes -std=gnu99 -Wshadow -Wconversion -Wvla -Wdouble-promotion -Wmissing-noreturn -Wmissing-format-attribute -Wmissing-prototypes -fno-common -Wno-unused-result -Wimplicit-fallthrough -fdiagnostics-color=always -fstack-protector-strong -DUNIT_TESTING -DINCLUDE_GENERATED_DECLARATIONS -D_GNU_SOURCE -DNVIM_TS_HAS_SET_MAX_START_DEPTH -I/home/rafi/Downloads/neovim/.deps/usr/include/luajit-2.1 -I/usr/include -I/home/rafi/Downloads/neovim/.deps/usr/include -I/home/rafi/Downloads/neovim/build/src/nvim/auto -I/home/rafi/Downloads/neovim/build/include -I/home/rafi/Downloads/neovim/build/cmake.config -I/home/rafi/Downloads/neovim/src

   system vimrc file: "$VIM/sysinit.vim"
  fall-back for $VIM: "/usr/local/share/nvim"

Run :checkhealth for more info
benbrastmckie commented 5 months ago

You might try switching to the stable release 9.5. I know that there are some features in the works to get indent-bankline to work with wrapped lines, but haven't tested that myself and don't know if v.10 is bug free.

I took a quick look through the open and closed issues here but didn't see anything that matched what you have. But you might take another look there in case I missed something.

rafisics commented 5 months ago

Yes, after switching to the stable NVIM v0.9.5, I am not getting the errors.

benbrastmckie commented 5 months ago

That's great! Glad to hear it.

rafisics commented 5 months ago

I think it would be nice to mention it in the nvim installation section.

benbrastmckie commented 5 months ago

Will do!