Skip to content

Commit

Permalink
[vscode] Read args from keybindings #9126
Browse files Browse the repository at this point in the history
Signed-off-by: Alexander Kozinko <[email protected]>
  • Loading branch information
xcariba authored and RomanNikitenko committed Apr 21, 2021
1 parent 088533e commit 82c2bc4
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 3 deletions.
4 changes: 4 additions & 0 deletions packages/plugin-ext/src/common/plugin-protocol.ts
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,8 @@ export interface PluginPackageKeybinding {
mac?: string;
linux?: string;
win?: string;
// eslint-disable-next-line @typescript-eslint/no-explicit-any
args?: any;
}

export interface PluginPackageGrammarsContribution {
Expand Down Expand Up @@ -706,6 +708,8 @@ export interface Keybinding {
mac?: string;
linux?: string;
win?: string;
// eslint-disable-next-line @typescript-eslint/no-explicit-any
args?: any;
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -492,7 +492,8 @@ export class TheiaPluginScanner implements PluginScanner {
when: rawKeybinding.when,
mac: rawKeybinding.mac,
linux: rawKeybinding.linux,
win: rawKeybinding.win
win: rawKeybinding.win,
args: rawKeybinding.args
};
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,8 @@ export class KeybindingsContributionPointHandler {
if (!keybinding) {
return undefined;
}
const { command, when } = pluginKeybinding;
return { keybinding, command, when };
const { command, when, args } = pluginKeybinding;
return { keybinding, command, when, args };
}

protected toOSKeybinding(pluginKeybinding: PluginKeybinding): string | undefined {
Expand Down

0 comments on commit 82c2bc4

Please sign in to comment.