Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
traxys opened this issue Aug 28, 2024 · 4 comments
Open

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

traxys opened this issue Aug 28, 2024 · 4 comments

Comments

@traxys
Copy link

traxys commented Aug 28, 2024

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 added a commit that referenced this issue Aug 28, 2024
@3rd
Copy link
Owner

3rd commented Aug 28, 2024

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

@traxys
Copy link
Author

traxys commented Aug 29, 2024

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!

@memaddr
Copy link

memaddr commented Nov 14, 2024

I find myself needing the same functionality.
Not all edits I do to diagrams are in insert mode (e.g., move some lines around, delete some parts), and not all normal-mode edits need to be regenerated.
As such, it would be nice to enable/disable rendering (i.e., have a toggle), when working on the diagrams.
Also, it would be great if there was an option to have the plugin start disabled to avoid document loading latency as mentioned by the original problem description - sometimes I just want to read/edit the text, and if I need the images I could press the button and wait for them.

I see that some implementation was made but it does not appear that it was merged, any chance that you could merge it?

@Catmaniscatlord
Copy link

Small bump here if you could merge this.

Ditto what the man above said.

P.s
I really like the functionality that this plugin brings, along with your image.nvim plugin.

I would love it if you were able to work with render-markdown or the obsidian to copy over the functionality.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants