Closed pabloavi closed 5 months ago
Hi,
I acknowledge that this is a desirable feature. However, currently the preview is entirely tied to the life time of the buffer. When the buffer is unloaded, the preview is shut down. And when there are multiple preview going on at the same time, they are index by their buffer number. While implementing this certainly wouldn't be hard. It wouldn't be trivial either, and I certainly don't have any time to do this anytime soon sorry.
I would be happy to review and accept any pull request though :).
We have a project tree:
Currently, one has to enter the main file of a project, run
:TypstPreview
and open the included subfile in order to edit it and preview the project. However, if one opens a subfile (that does not import template, etc.), it just previews it, not the whole project, which contains all the contents, template...Ideally, there should be a
get_main_file
function, similar toget_root
, that is user-defined and returns the file that should be preview, so that each user can decide what the main file of a project is. That way, when:TypstPreview
or alternative commands are used, they create the preview of the whole project, as it is based on the master file that includes the subfiles.