2024-07-13 21:22:20 -04:00
|
|
|
{
|
|
|
|
config,
|
2024-07-13 21:24:21 -04:00
|
|
|
lib,
|
|
|
|
pkgs,
|
2024-07-13 21:22:20 -04:00
|
|
|
...
|
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
|
|
|
|
];
|
2024-07-13 21:22:20 -04:00
|
|
|
|
2024-07-15 15:45:02 -04:00
|
|
|
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
|
|
|
|
2024-07-15 15:45:02 -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;
|
|
|
|
};
|
2024-07-13 21:22:20 -04:00
|
|
|
|
2024-07-15 15:45:02 -04:00
|
|
|
auto_update = false;
|
|
|
|
autosave.after_delay.milliseconds = 1000;
|
2024-08-03 21:07:55 -04:00
|
|
|
buffer_font_family = "UbuntuSansMono Nerd Font";
|
2024-07-15 15:45:02 -04:00
|
|
|
buffer_font_size = 14;
|
|
|
|
current_line_highlight = "line";
|
2024-07-13 21:24:21 -04:00
|
|
|
|
2024-07-15 15:45:02 -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
|
|
|
|
2024-07-15 15:45:02 -04:00
|
|
|
tab_size = 2;
|
|
|
|
};
|
2024-07-13 21:24:21 -04:00
|
|
|
};
|
|
|
|
|
2024-07-15 15:45:02 -04:00
|
|
|
preferred_line_length = 80;
|
2024-07-13 23:35:22 -04:00
|
|
|
|
2024-07-15 15:45:02 -04:00
|
|
|
tab_bar = {
|
2024-07-30 12:10:49 -04:00
|
|
|
show = true;
|
2024-07-15 15:45:02 -04:00
|
|
|
show_nav_history_buttons = false;
|
|
|
|
};
|
2024-07-13 23:35:22 -04:00
|
|
|
|
2024-07-15 15:45:02 -04:00
|
|
|
tabs = {
|
|
|
|
close_position = "right";
|
|
|
|
git_status = true;
|
|
|
|
};
|
2024-07-13 23:35:22 -04:00
|
|
|
|
2024-07-15 15:45:02 -04:00
|
|
|
telemetry = {
|
2024-07-30 12:08:27 -04:00
|
|
|
diagnostics = false;
|
|
|
|
metrics = false;
|
2024-07-15 15:45:02 -04:00
|
|
|
};
|
2024-07-13 21:24:21 -04:00
|
|
|
|
2024-08-03 21:07:55 -04:00
|
|
|
terminal.font_size = 14;
|
2024-07-13 23:35:22 -04:00
|
|
|
|
2024-07-15 15:45:02 -04:00
|
|
|
theme = {
|
|
|
|
dark = "Adwaita Pastel Dark";
|
|
|
|
light = "Adwaita Pastel Light";
|
|
|
|
mode = "system";
|
|
|
|
};
|
2024-07-13 21:24:21 -04:00
|
|
|
|
2024-08-03 21:07:55 -04:00
|
|
|
ui_font_family = "UbuntuSans Nerd Font";
|
2024-07-15 15:45:02 -04:00
|
|
|
ui_font_size = 16;
|
2024-07-27 22:15:39 -04:00
|
|
|
use_autoclose = false;
|
2024-07-15 15:45:02 -04:00
|
|
|
vim_mode = false;
|
|
|
|
};
|
2024-07-18 21:05:35 -04:00
|
|
|
|
2024-07-15 15:45:02 -04:00
|
|
|
settings = defaults // config.ar.home.apps.zed.settings;
|
|
|
|
in
|
|
|
|
lib.generators.toJSON {} settings;
|
|
|
|
};
|
2024-07-13 21:22:20 -04:00
|
|
|
};
|
|
|
|
}
|