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

Improved export conditions #618

Open
OverHash opened this issue Sep 30, 2024 · 1 comment
Open

Improved export conditions #618

OverHash opened this issue Sep 30, 2024 · 1 comment
Labels
enhancement New feature or request export Features about exporting documents

Comments

@OverHash
Copy link

OverHash commented Sep 30, 2024

Motivation

Currently, opening vscode with the export pdf set to onSave will automatically trigger a render of the last opened Typst document. This is less than ideal as it can cause merge conflicts when using Git to pull changes, as the exported pdf by typst modifies the ModifiedDate field of the PDF. This behavior is particularly likely to happen when the exported PDF of a document is stored in Git.

Description

I currently have to use git restore to revert this compiled PDF each time I open vscode before I can run git pull and pull changes from my upstream repository, to avoid having these merge conflicts happen. This is less than ideal.

It's briefly touched upon in #555 (comment), but there was also some discussion on Discord about improving the way tinymist can trigger an export of a PDF. Potential predicates are:

  • onSave
  • onType
  • onDocTitles
  • onPinned

Adding something like onPinnedAndSaved would solve my use case, however there may be other export conditions people want. Perhaps this issue can be used to discuss other ways the export system could work (e.g., the customization suggested in #555 (comment), however even adding a onPinnedAndSave would be a big improvement.

Alternatives

Perhaps the onSave export option could be changed so that when a PDF is not saved, but rather the vscode instance is just opened, it does not trigger a save.

@Myriad-Dreamin
Copy link
Owner

This looks similar to #555 but not exactly. I think it makes sense to just make lsp export your documents until your first fresh save.

@Myriad-Dreamin Myriad-Dreamin added the enhancement New feature or request label Sep 30, 2024
@Myriad-Dreamin Myriad-Dreamin added the export Features about exporting documents label Oct 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request export Features about exporting documents
Projects
None yet
Development

No branches or pull requests

2 participants