3rd/diagram.nvim

Images are not changed when changing renderer options

Closed this issue · 4 comments

If you open a document containing say a mermaid diagram, then change the rendered_options, for example apply a new theme, and re-open the document the image will not have changed.

I think this is due to the internal cache, as the image has the same code so the same hash

3rd commented

Hey, yes it's the internal cache, would exposing a function to clear the cache be ok?

No idea what would be the best idea, to fix it myself I simply deleted the folder manually, but maybe other people may trip on that. I don't really know what to do, sorry :/

3rd commented

Maybe a .get_cache_dir() to return the path to make it easier 🤷

3rd commented

/copilot extend the API with a .get_cache_dir() function that returns the cache location