Closed wisp3rwind closed 4 months ago
Thank you for bringing this to my attention.
It'll take me some time to think about how to approach this. I think perhaps this is a good opportunity to rewrite this plugin in a more OOP fashion. I feel like the way that so many different tables are indexed by bufnr
makes me very uncomfortable.
I might never take any commit in this PR but I'll make sure to credit you when I reimplement this functionality after the OOP rewrite. Alternatively, if you'd like to rewrite this PR yourself I can let you know when I finish the OOP rewrite :).
Sounds good! Feel free to just implement this yourself, but if you want some help, ping me and I'll see whether I can find some time.
Completed as a part of #31.
This augments the
:TypstPreview
command such that it supports the different preview modes from Enter-tainer/typst-preview::TypstPreview
is the same as before:TypstPreview document
is equivalent to:TypstPreview
:TypstPreview slide
opens the server in slide modeI know only a minimal amount of lua and the nvim API, let me know if I implemented anything in an usual way!
A possible future improvement could be to check whether the document seems to be using
polylux
and choose the default mode accordingly.