config: add zed editor

This commit is contained in:
Fabian Montero 2025-08-26 19:02:42 -06:00
parent fab1778ec8
commit f0dee85621
Signed by: fabian
GPG key ID: 1FFAC35E1798174F
3 changed files with 95 additions and 0 deletions

View file

@ -19,5 +19,6 @@
./syncthing.nix
./deepState.nix
./mapping.nix
./zed.nix
];
}

93
home/modules/zed.nix Normal file
View file

@ -0,0 +1,93 @@
{
config,
lib,
pkgs,
...
}:
with lib; let
cfg = config.local.apps.zed;
in {
options.local.apps.zed.enable = mkEnableOption "zed editor settings";
config = mkIf cfg.enable {
programs.zed-editor = {
enable = true;
extensions = [
"nix"
"codebook"
"vscode-dark-high-contrast"
"catppuccin-icons"
];
extraPackages = with pkgs; [
nixd
];
userSettings = {
disable_ai = true;
theme = {
dark = "VSCode Dark High Contrast";
light = "VSCode Dark High Contrast";
};
icon_theme = {
dark = "Catppuccin Latte";
light = "Catppuccin Latte";
};
file_icons = true;
rulers = [80 120];
preferred_line_length = 120;
scroll_past_end = true;
cursor = {
blink_interval = 600;
smooth_scroll = true;
};
autosave = "on_focus_change";
auto_update = false;
buffer_font_family = "JetBrains Mono";
buffer_font_size = 22;
hide_mouse = "never";
minimap.show = "auto";
tabs = {
file_icons = true;
git_status = true;
activate_on_close = "neighbour";
show_close_button = "always";
};
toolbar = {
breadcrumbs = true;
quick_actions = true;
selections_menu = true;
agent_review = false;
code_actions = false;
};
format_on_save = "off";
use_autoclose = false;
git = {
git_gutter = "tracked_files";
inline_blame = {
enabled = true;
delay_ms = 5000;
};
};
indent_guides = {
enabled = true;
line_width = 1;
active_line_width = 1;
coloring = "fixed";
background_coloring = "disabled";
};
hour_format = "hour24";
remove_trailing_whitespace_on_save = true;
use_smartcase_search = true;
soft_wrap = "editor_width";
tab_size = 2;
telemetry = {
diagnostics = false;
metrics = false;
};
auto_fold_dirs = false;
scrollbar = {
show = "always";
};
unnecessary_code_fade = 0.0;
};
};
};
}

View file

@ -46,6 +46,7 @@
defaultDesktopPack.enable = true;
firefox.enable = true;
mapping.enable = true;
zed.enable = true;
};
gui = {