VSpaceCode/vspacecode.github.io

Cannot Redefine Keybindings on a per Workspace Basis

Closed this issue · 1 comments

Bug description

I am attempting to redefine <SPC> + p for a particular workspace, however the bindings that I have defined are not overriding the original bindings.

To Reproduce

  1. Open a workspace in VS Code.
  2. Add the following to .vscode/settings.json
	"vspacecode.bindingOverrides": [
		{
			"key": "p",
			"name": "+Project",
			"icon": "project",
			"type": "bindings",
			"bindings": [
				{
					"key": "C",
					"name": "Compile project",
					"icon": "gear",
					"type": "command",
					"command": "workbench.action.tasks.build"
				}
			]
                }
         ]
  1. Type <SPC> + p
  2. Witness that the menu has not changed.

Expected behavior

After the above steps I would expect that the menu would now only contain the "Compile project" command, but it contains all the default commands.

Additional context

We should be able to override keybindings on a per workspace basis by adding the keybindings to .vscode/settings.json.

I should also mention that I am able to add things to the menu via

		{
			"keys": "p.C",
			"name": "Compile project",
			"icon": "gear",
			"type": "command",
			"command": "workbench.action.tasks.build"
		},

but I am unable to redefine a keybinding like so

		{
			"keys": "p.l",
			"name": "Launch package",
			"icon": "rocket",
			"command": "workbench.action.tasks.runTask",
			"args": "state_machine: Launch"
		},

Wrong place.