Skip to content

Commit

Permalink
feat: scroll or kill all preview panels
Browse files Browse the repository at this point in the history
  • Loading branch information
Myriad-Dreamin committed Mar 6, 2025
1 parent 156896c commit 3ec61ab
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions editors/vscode/src/lsp.ts
Original file line number Diff line number Diff line change
Expand Up @@ -361,6 +361,13 @@ export class LanguageState {
return await tinymist.executeCommand(`tinymist.doKillPreview`, [taskId]);
}

/**
* Kills all preview tasks. See {@link _GroupDocumentPreviewFeatureCommands} for more information.
*/
async killAllPreview(): Promise<void> {
return await tinymist.executeCommand(`tinymist.doKillPreview`);
}

/**
* Scrolls the preview to a specific position. See {@link _GroupDocumentPreviewFeatureCommands}
* for more information.
Expand All @@ -372,6 +379,14 @@ export class LanguageState {
return await tinymist.executeCommand(`tinymist.scrollPreview`, [taskId, req]);
}

/**
* Scrolls all the preview to some position. See {@link _GroupDocumentPreviewFeatureCommands}
* for more information.
*/
async scrollAllPreview(): Promise<void> {
return await tinymist.executeCommand(`tinymist.scrollPreview`);
}

/**
* Registers the preview notifications receiving from the language server. See
* {@link _GroupDocumentPreviewFeatureCommands} for more information.
Expand Down

0 comments on commit 3ec61ab

Please sign in to comment.