fix: expose pin/unpin commands for vscode (#121)

This commit is contained in:
Myriad-Dreamin 2024-03-29 15:27:11 +08:00 committed by GitHub
parent 529b422189
commit 858c100146
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 16 additions and 0 deletions

View file

@ -375,6 +375,16 @@
"title": "Export the currently open file as PDF",
"category": "Typst"
},
{
"command": "tinymist.pinMainToCurrent",
"title": "Pin the main file to the currently opened document",
"category": "Typst"
},
{
"command": "tinymist.unpinMain",
"title": "Unpin the main file",
"category": "Typst"
},
{
"command": "tinymist.showPdf",
"title": "Show the compiled PDF of the currently opened typst file",

View file

@ -121,6 +121,12 @@ async function startClient(context: ExtensionContext): Promise<void> {
context.subscriptions.push(
commands.registerCommand("tinymist.exportCurrentPdf", () => commandExport("Pdf"))
);
context.subscriptions.push(
commands.registerCommand("tinymist.pinMainToCurrent", () => commandPinMain(true))
);
context.subscriptions.push(
commands.registerCommand("tinymist.unpinMain", () => commandPinMain(false))
);
context.subscriptions.push(
commands.registerCommand("typst-lsp.pinMainToCurrent", () => commandPinMain(true))
);