snacks.nvim
snacks.nvim copied to clipboard
bug: Mermaind rendering in Markdown will not fold
Did you check docs and existing issues?
- [x] I have read all the snacks.nvim docs
- [x] I have updated the plugin to the latest version before submitting this issue
- [x] I have searched the existing issues of snacks.nvim
- [x] I have searched the existing issues of plugins related to this issue
Neovim version (nvim -v)
NVIM v0.11.0-dev-1775+g4a2a54f993
Operating system/version
Fedora 41
Describe the bug
Mermaid preview will persist even when the code block or a heading are folded and the source is not visible anymore. There is no issue with previews for the images itself or latex inline / part of the codeblock.
See the video for the better explanation.
https://github.com/user-attachments/assets/92f4db15-6ff6-4164-b34f-146f921a9936
There is another small issue visible in the video when unfolding the heading containing an image for the first time,. I have not played with it enough yet though. Let me know what you think, please as If it is needed I will log another bug report.
Steps To Reproduce
- Enable inline preview.
- Open example.md
- Play with folds.
Expected Behavior
Preview to disappear when folded.
Repro
vim.env.LAZY_STDPATH = ".repro"
load(vim.fn.system("curl -s https://raw.githubusercontent.com/folke/lazy.nvim/main/bootstrap.lua"))()
require("lazy.minit").repro({
spec = {
{ "folke/snacks.nvim", opts = {} },
-- add any other plugins here
},
})