Skip to content

feat: add external diagram view#49

Open
marchellll wants to merge 1 commit into
3rd:masterfrom
marchellll:master
Open

feat: add external diagram view#49
marchellll wants to merge 1 commit into
3rd:masterfrom
marchellll:master

Conversation

@marchellll

Copy link
Copy Markdown

External diagram view

When the diagram too crowded, i need zoom.

Adds a way to render the diagram at the cursor and open the image with the system default app (vim.ui.open), using the same render path as hover but without the tab / image.nvim preview.

What changed

open_diagram_externally_at_cursor (hover.lua): resolves the diagram under the cursor, runs the matching renderer, waits for async jobs when needed (e.g. Mermaid), then opens the output file.
• Public API: open_diagram_externally on the plugin module (init.lua) calls the above.
• Small cleanup: drop unused col in get_diagram_at_cursor, minor whitespace / hover hint formatting.

Usage

Call require("diagram").open_diagram_externally() (e.g. from a keymap) when you want the PNG opened in Preview / your OS viewer instead of inside Neovim.

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

Successfully merging this pull request may close these issues.

1 participant