mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-26 11:59:49 +00:00
Add landing/faq walkthroughs and commands for quick access
This commit is contained in:
parent
4e836c622a
commit
57497645f8
3 changed files with 128 additions and 0 deletions
|
@ -1502,3 +1502,23 @@ export function toggleLSPLogs(ctx: Ctx): Cmd {
|
|||
}
|
||||
};
|
||||
}
|
||||
|
||||
export function openWalkthrough(_: Ctx): Cmd {
|
||||
return async () => {
|
||||
await vscode.commands.executeCommand(
|
||||
"workbench.action.openWalkthrough",
|
||||
"rust-lang.rust-analyzer#landing",
|
||||
false,
|
||||
);
|
||||
};
|
||||
}
|
||||
|
||||
export function openFAQ(_: Ctx): Cmd {
|
||||
return async () => {
|
||||
await vscode.commands.executeCommand(
|
||||
"workbench.action.openWalkthrough",
|
||||
"rust-lang.rust-analyzer#faq",
|
||||
true,
|
||||
);
|
||||
};
|
||||
}
|
||||
|
|
|
@ -178,6 +178,8 @@ function createCommands(): Record<string, CommandFactory> {
|
|||
viewMemoryLayout: { enabled: commands.viewMemoryLayout },
|
||||
toggleCheckOnSave: { enabled: commands.toggleCheckOnSave },
|
||||
toggleLSPLogs: { enabled: commands.toggleLSPLogs },
|
||||
openWalkthrough: { enabled: commands.openWalkthrough },
|
||||
openFAQ: { enabled: commands.openFAQ },
|
||||
// Internal commands which are invoked by the server.
|
||||
applyActionGroup: { enabled: commands.applyActionGroup },
|
||||
applySnippetWorkspaceEdit: { enabled: commands.applySnippetWorkspaceEditCommand },
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue