Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support partial override #56

Open
mly32 opened this issue Nov 14, 2021 · 1 comment
Open

Support partial override #56

mly32 opened this issue Nov 14, 2021 · 1 comment
Labels
enhancement New feature or request

Comments

@mly32
Copy link
Contributor

mly32 commented Nov 14, 2021

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 mly32 added the enhancement New feature or request label Nov 14, 2021
@stevenguh
Copy link
Member

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 stevenguh changed the title Override default bindings to be hidden Support partial override Nov 17, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants