nixcfg/homeManagerModules/apps/zed/default.nix

104 lines
2.4 KiB
Nix
Raw Normal View History

{
config,
2024-07-13 21:24:21 -04:00
lib,
pkgs,
...
2024-07-13 21:24:21 -04:00
}: {
config = lib.mkIf config.ar.home.apps.zed.enable {
home.packages = [
config.ar.home.apps.zed.package
pkgs.nixd
];
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;
2024-07-13 21:24:21 -04:00
"zed/settings.json".text = let
defaults = {
auto_install_extensions = {
adwaita-pastel = true;
basher = true;
docker-compose = true;
dockerfile = true;
git-firefly = true;
haskell = true;
html = true;
ini = true;
just = true;
log = true;
make = true;
nix = true;
ruby = true;
};
auto_update = false;
autosave.after_delay.milliseconds = 1000;
buffer_font_family = "NotoSansM Nerd Font";
buffer_font_size = 14;
current_line_highlight = "line";
2024-07-13 21:24:21 -04:00
indent_guides = {
enabled = true;
background_coloring = "disabled";
coloring = "indent_aware";
line_width = 1;
};
languages = {
Nix = {
formatter.external = {
command = lib.getExe pkgs.alejandra;
arguments = [];
};
2024-07-13 23:35:22 -04:00
tab_size = 2;
};
2024-07-13 21:24:21 -04:00
};
preferred_line_length = 80;
2024-07-13 23:35:22 -04:00
tab_bar = {
show = false;
show_nav_history_buttons = false;
};
2024-07-13 23:35:22 -04:00
tabs = {
close_position = "right";
git_status = true;
};
2024-07-13 23:35:22 -04:00
telemetry = {
diagnostics = true;
metrics = true;
};
2024-07-13 21:24:21 -04:00
terminal.font_size = 12;
2024-07-13 23:35:22 -04:00
theme = {
dark = "Adwaita Pastel Dark";
light = "Adwaita Pastel Light";
mode = "system";
};
2024-07-13 21:24:21 -04:00
ui_font_size = 16;
vim_mode = false;
};
settings = defaults // config.ar.home.apps.zed.settings;
in
lib.generators.toJSON {} settings;
};
};
}