Breaks with hologram auto_display = true
matthewsia98 opened this issue · comments
Error executing vim.schedule lua callback: ...ocal/share/nvim/lazy/hologram.nvim/lua/hologram/init.lua:47: Invalid buffer id: 3
stack traceback:
[C]: in function 'nvim_buf_get_extmarks'
...ocal/share/nvim/lazy/hologram.nvim/lua/hologram/init.lua:47: in function 'buf_render_images'
...ocal/share/nvim/lazy/hologram.nvim/lua/hologram/init.lua:17: in function <...ocal/share/nvim/lazy/hologram.nvim/lua/hologram/init.lua:17>
Error executing vim.schedule lua callback: ...ocal/share/nvim/lazy/hologram.nvim/lua/hologram/init.lua:47: Invalid buffer id: 4
stack traceback:
[C]: in function 'nvim_buf_get_extmarks'
...ocal/share/nvim/lazy/hologram.nvim/lua/hologram/init.lua:47: in function 'buf_render_images'
...ocal/share/nvim/lazy/hologram.nvim/lua/hologram/init.lua:17: in function <...ocal/share/nvim/lazy/hologram.nvim/lua/hologram/init.lua:17>
E492: Not an editor command: Mes
Error executing vim.schedule lua callback: ...ocal/share/nvim/lazy/hologram.nvim/lua/hologram/init.lua:47: Invalid buffer id: 500
stack traceback:
[C]: in function 'nvim_buf_get_extmarks'
...ocal/share/nvim/lazy/hologram.nvim/lua/hologram/init.lua:47: in function 'buf_render_images'
...ocal/share/nvim/lazy/hologram.nvim/lua/hologram/init.lua:17: in function <...ocal/share/nvim/lazy/hologram.nvim/lua/hologram/init.lua:17>
Error executing vim.schedule lua callback: ...ocal/share/nvim/lazy/hologram.nvim/lua/hologram/init.lua:47: Invalid buffer id: 499
stack traceback:
[C]: in function 'nvim_buf_get_extmarks'
...ocal/share/nvim/lazy/hologram.nvim/lua/hologram/init.lua:47: in function 'buf_render_images'
...ocal/share/nvim/lazy/hologram.nvim/lua/hologram/init.lua:17: in function <...ocal/share/nvim/lazy/hologram.nvim/lua/hologram/init.lua:17>
From my understanding, there is nothing I can do about this inside my plugin, because it is related to how hologram displays its images. What I found is that every image that I create using hologram's API is counted as an image from hologram, and so it tries to treat it as if it was a normal image displayed in a markdown file. To fix this I should then change a part of hologram, which I'm not sure if I can do. Any advice is appreciated.
Looks like there is a PR open for this on hologram, but project doesn't seem active
I guess that since the maintainer doesn't seem active, we could either switch to the fork from the person that created PR you mentioned, or create a new one with the fix applied. Do you have any suggestion on which option might be best?
I think this project should maintain its own fork of hologram
I have implemented the necessary changes in my fork of hologram, switching the dependency from "edluffy/hologram.nvim"
to "giusgad/hologram.nvim"
and updating your plugins should hopefully be enough.
I opened #29 for your new issue, thank you!