move vscode keybindings to file

This commit is contained in:
Sean Buckley 2023-05-22 02:59:13 -04:00
parent 23d24ca511
commit feef47959a
2 changed files with 16 additions and 6 deletions

View file

@ -98,6 +98,7 @@ with lib;
ln -sf /etc/vscode-keybindings.json ~/.config/Code/User/keybindings.json ln -sf /etc/vscode-keybindings.json ~/.config/Code/User/keybindings.json
''; '';
environment.etc."vscode-keybindings.json".source = ./vscode-keybindings.json;
environment.etc."vscode-settings.json".text = builtins.toJSON ( environment.etc."vscode-settings.json".text = builtins.toJSON (
( (
builtins.fromJSON (builtins.readFile ./vscode-settings.json) builtins.fromJSON (builtins.readFile ./vscode-settings.json)
@ -111,12 +112,6 @@ with lib;
} }
); );
environment.etc."vscode-keybindings.json".text = builtins.toJSON [
{ key = "ctrl+w"; command = "-workbench.action.terminal.killEditor"; }
{ key = "ctrl+e"; command = "-workbench.action.quickOpen"; }
{ key = "ctrl+e"; command = "workbench.action.quickOpen"; when = "!terminalFocus"; }
];
boot.loader.timeout = 1; boot.loader.timeout = 1;
}; };
} }

View file

@ -0,0 +1,15 @@
[
{
"key": "ctrl+w",
"command": "-workbench.action.terminal.killEditor"
},
{
"key": "ctrl+e",
"command": "-workbench.action.quickOpen"
},
{
"key": "ctrl+e",
"command": "workbench.action.quickOpen",
"when": "!terminalFocus"
}
]