Nvim-Tree with Default NvChad options causes error
Va1a opened this issue · comments
When I open a folder in the NvChad directory explorer left sidebar, precognition throws the following error, preventing me from opening the directory. I am then required to disable the plugin (using :lua requrie("precognition").toggle()
) to open the directory and then I need to re-enable the plugin.
Error detected while processing CursorHold Autocommands for "*": Error executing lua callback: ...re/nvim/lazy/precognition.nvim/lua/precognition/init.lua:124: attempt to index a nil value stack traceback: ...re/nvim/lazy/precognition.nvim/lua/precognition/init.lua:124: in function 'build_virt_line' ...re/nvim/lazy/precognition.nvim/lua/precognition/init.lua:211: in function <...re/nvim/lazy/precognition.nvim/lua/precognition/init.lua:184>
Thanks for the report @Va1a
Please could you share your precognition config too please?
Also, are you on the latest update, I pushed some fairly substantial updates today
Yes, I am on the latest update. My config is completely default, the only change I have made:
{
"tris203/precognition.nvim",
config = {
showBlankVirtLine = false
}
}
(fwiw, the error occurred even before I made this minor config change)
Okay, I have managed to recreate it by installing nvim-tree with the NvChad default config
I will take a look at this in the next few days
okay, its the hijack_cursor
option in nvim-tree that does it.
I will do some reading into what this option does, but if it is moving the cursor it would make sense that precognition gets confused about what it would be trying to draw
*nvim-tree.hijack_cursor*
Keeps the cursor on the first letter of the filename when moving in the tree.
Type: `boolean`, Default: `false`
This should be fixed in the blacklist_buffers
branch
Please could you try it out @Va1a
Yes, the issue is fixed in this branch. Thanks very much!
Brilliant, will hopefully get that merged back into main tomorrow
Merged, hopefully this is all good now!