vscode-which-key icon indicating copy to clipboard operation
vscode-which-key copied to clipboard

Support partial override

Open mly32 opened this issue 3 years ago • 1 comments

Problem

I would like to use the display: hidden options for focusing windows (space.1..9), but the way I'm currently doing it is this:

"vspacecode.bindingOverrides": [
  {
    "keys": "1",
    "name": "Focus 1st Window",
    "display": "hidden",
    "type": "command",
    "command": "workbench.action.focusFirstEditorGroup"
  },
  ....
],
...

Solution

Ideally, I'd just need to have:

"vspacecode.bindingOverrides": [
  { "keys": "1", "display": "hidden" },
]

without needing to redefine the entire keybinding.

Alternatives

Additional context

Not sure if this is an issue that goes belongs to which-key or spacecode... Maybe I'm also just using the flag wrong. Why does the documentation say this:

This type contains all the possible way to display a BindingItem or TransientBindingItem.

Does this mean the hidden option is not supported in OverrideBindingItem?

mly32 avatar Nov 14 '21 12:11 mly32

The idea in the solution sounds good to me.


This type contains all the possible way to display a BindingItem or TransientBindingItem.

Does this mean the hidden option is not supported in OverrideBindingItem?

It should work for OverrideBindingItem. Does display: "hidden" not work for you in OverrideBindingItem?

It was probably a miss in the documentation because we didn't have OverrideBindingItem in the type section I think.

stevenguh avatar Nov 16 '21 03:11 stevenguh