3rd / diagram.nvim

Diagrams as code in Neovim.
118 stars 6 forks source link

[feature request] Allow to disable the rendering of images #6

Open traxys opened 1 month ago

traxys commented 1 month ago

It would be nice to have a command along the lines of Diagrams <toggle|enable|disable> [bufnr] that allows to disable the rendering of images for the current buffer.

My main use case for such a feature is having a wiki using wiki.vim, where I browse & edit my entries through neovim. I'd like to have images when browsing, but when editing I would not care much for having the images rendered automatically, especially since it adds a bit of latency on changing modes.

3rd commented 1 month ago

Hey, can you try out this branch? https://github.com/3rd/diagram.nvim/tree/feature/toggle

traxys commented 1 month ago

The branch enables my use case!

I did not test it exhaustively, but did not see any issue with the use case I described, thanks for the quick implementation!