diff --git a/editors/vscode/package.json b/editors/vscode/package.json index 4167264f..f40c5d0c 100644 --- a/editors/vscode/package.json +++ b/editors/vscode/package.json @@ -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", diff --git a/editors/vscode/src/extension.ts b/editors/vscode/src/extension.ts index 53357db9..f7d651b3 100644 --- a/editors/vscode/src/extension.ts +++ b/editors/vscode/src/extension.ts @@ -121,6 +121,12 @@ async function startClient(context: ExtensionContext): Promise { 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)) );