mirror of
https://github.com/alyraffauf/nixcfg.git
synced 2024-11-22 11:43:55 -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
|
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 = {
|
defaults = {
|
||||||
auto_install_extensions = {
|
auto_install_extensions = {
|
||||||
adwaita-pastel = true;
|
adwaita-pastel = true;
|
||||||
|
@ -84,4 +99,5 @@
|
||||||
in
|
in
|
||||||
lib.generators.toJSON {} settings;
|
lib.generators.toJSON {} settings;
|
||||||
};
|
};
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -57,6 +57,12 @@ in {
|
||||||
enable = lib.mkEnableOption "Zed text editor.";
|
enable = lib.mkEnableOption "Zed text editor.";
|
||||||
package = lib.mkPackageOption pkgs "zed-editor" {};
|
package = lib.mkPackageOption pkgs "zed-editor" {};
|
||||||
|
|
||||||
|
keymaps = lib.mkOption {
|
||||||
|
description = "Zed keymaps.";
|
||||||
|
default = [];
|
||||||
|
type = lib.types.listOf lib.types.attrs;
|
||||||
|
};
|
||||||
|
|
||||||
settings = lib.mkOption {
|
settings = lib.mkOption {
|
||||||
description = "Zed settings.";
|
description = "Zed settings.";
|
||||||
default = {};
|
default = {};
|
||||||
|
|
Loading…
Reference in a new issue