mirror of
https://github.com/alyraffauf/nixcfg.git
synced 2024-11-22 05:53:56 -05:00
home/zed: add keymaps options with default additions (#32)
This commit is contained in:
parent
cb4d214916
commit
2f0b5cab25
|
@ -10,7 +10,22 @@
|
|||
pkgs.nixd
|
||||
];
|
||||
|
||||
xdg.configFile."zed/settings.json".text = let
|
||||
xdg.configFile = {
|
||||
"zed/keymap.json".text = let
|
||||
defaults = [
|
||||
{
|
||||
"context" = "Workspace";
|
||||
"bindings" = {
|
||||
"ctrl-p" = "command_palette::Toggle";
|
||||
"ctrl-shift-p" = "file_finder::Toggle";
|
||||
};
|
||||
}
|
||||
];
|
||||
keymaps = defaults ++ config.ar.home.apps.zed.keymaps;
|
||||
in
|
||||
lib.generators.toJSON {} keymaps;
|
||||
|
||||
"zed/settings.json".text = let
|
||||
defaults = {
|
||||
auto_install_extensions = {
|
||||
adwaita-pastel = true;
|
||||
|
@ -84,4 +99,5 @@
|
|||
in
|
||||
lib.generators.toJSON {} settings;
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
|
@ -57,6 +57,12 @@ in {
|
|||
enable = lib.mkEnableOption "Zed text editor.";
|
||||
package = lib.mkPackageOption pkgs "zed-editor" {};
|
||||
|
||||
keymaps = lib.mkOption {
|
||||
description = "Zed keymaps.";
|
||||
default = [];
|
||||
type = lib.types.listOf lib.types.attrs;
|
||||
};
|
||||
|
||||
settings = lib.mkOption {
|
||||
description = "Zed settings.";
|
||||
default = {};
|
||||
|
|
Loading…
Reference in a new issue