mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-28 04:44:57 +00:00
More second command to Ctx
This commit is contained in:
parent
e53ccb6e99
commit
29e86c0c72
4 changed files with 14 additions and 11 deletions
|
@ -16,7 +16,7 @@ export class Ctx {
|
|||
|
||||
registerCommand(
|
||||
name: string,
|
||||
factory: (ctx: Ctx) => () => Promise<vscode.TextEditor>,
|
||||
factory: (ctx: Ctx) => Cmd,
|
||||
) {
|
||||
const fullName = `rust-analyzer.${name}`
|
||||
const cmd = factory(this);
|
||||
|
@ -28,3 +28,5 @@ export class Ctx {
|
|||
this.extCtx.subscriptions.push(d)
|
||||
}
|
||||
}
|
||||
|
||||
export type Cmd = (...args: any[]) => any;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue