-
Notifications
You must be signed in to change notification settings - Fork 75
[Feature] Specify Path of Compiled pdf File #423
Comments
A previous PR #39 tried to solve that. |
(1) sounds more sensible than (2), because a project knows yield to some directory or with even specific file name, but a global configuration doesn't. It sounds like a task specific parameter in VSCode. Both of them makes sense to me, but it is a problem that how LSP manages them. At least, we still don't have any configuration file for a document. |
Thanks for weighing in @Myriad-Dreamin . If the contributors/maintainers would like, I'm ready to close this issue and move ongoing discussions to Issue #39 . |
Since #39 is an old PR and inactive, we can keep discussions in this issue. |
I'm keen on this change. Is it worth continuing on with the old PR? |
I could be misunderstanding the OP here. Sorry if that's the case. Given that VS Code supports workspace settings that override user settings in case of conflicts, the two possibilities suggested by the OP don't appear mutually exclusive. Users just need to specify the relative path for storing the compiled outputs in the extension's settings. Whether the path parameter should be project-specific or global is determined by whether the user writes the config to VS Code's user or workspace settings. |
The issue is that not everybody who uses this language server uses it with VSCode. As this is the only language server for typst, a lot of people use it in Neovim. The feature that this issue is addressing (the ability to specify an output directory) is not present within the language server itself, whereas the ability to compile a pdf onSave is. |
At the moment, the compiled pdf file is saved in the same directory as the typ file, and with the same name as the typ file.
In this feature request, I would like to propose the possibility of offering users the option to:
1. Specify the location to save the compiled pdf file.
Recognizing relative paths (with respect to the directory containing the typ file) will be convenient for specifying the compiled pdf file to be saved in directories nearby.
2. Specify the filename of the compiled pdf file.
These two features would help users like myself who are trying to get the compiled pdf to appear in the directory above the typst file's directory as depicted in this file structure:
In #420, someone asked what might the UI look like, and I replied with two possibilities off the top of my head:
1. Each project has its own config file to specify preferences. This config file is optional and exists to specify preferences deviating from defaults.
This is similar to the commonly encountered concept of a project's directory housing a file with project-specific preferences for an IDE's configuration, compilation instructions, or git.
2. A single "central" Typst LSP config file that specifies preferences for all projects.
Possibility (2) appears to be less convenient than (1) should there arise the need to share preferences among co-authors. In (1), an author could commit the config file alongside their project's typ files to, say, a shared git repository, and a co-author cloning the repository would experience the preference settings "just work out of the box" without needing to copy-and-paste preferences into his own Typst LSP config file if possibility (2) had instead been effected.
Thank you for reading, and would be happy to receive feedback/suggestions from others.
The text was updated successfully, but these errors were encountered: