Skip to content

Commit

Permalink
home-manager: add Zed editor
Browse files Browse the repository at this point in the history
  • Loading branch information
srid committed Dec 16, 2024
1 parent 8d7dc35 commit 941c8a6
Show file tree
Hide file tree
Showing 5 changed files with 1,650 additions and 1 deletion.
1 change: 0 additions & 1 deletion configurations/nixos/vixen/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@ in
environment.systemPackages = with pkgs; [
google-chrome
vscode
zed-editor
telegram-desktop
];

Expand Down
51 changes: 51 additions & 0 deletions modules/home/all/zed/default.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
# https://github.com/nix-community/home-manager/blob/master/modules/programs/zed-editor.nix
{
home.file.".config/zed/themes".source = ./themes;

programs.zed-editor = {
enable = true;

# https://github.com/zed-industries/extensions/tree/main/extensions
extensions = [
"just"
"nix"
];

userSettings = {
imports = [ ./remote-projects.nix ];

vim_mode = true;
base_keymap = "VSCode";
soft_wrap = "editor_width";
tab_size = 2;

# direnv
load_direnv = "shell_hook";
lsp =
let useDirenv = { binary.path_lookup = true; };
in {
haskell = useDirenv;
rust_analyzer = useDirenv;
nix = useDirenv;
};

# Look & feel
ui_font_size = 16;
ui_font_family = "Cascadia Code";
buffer_font_size = 14;
theme = {
mode = "system";
light = "Catppuccin Mocha";
dark = "One Dark";
};

# Layout
outline_panel = {
dock = "right";
};
project_panel = {
dock = "right";
};
};
};
}
10 changes: 10 additions & 0 deletions modules/home/all/zed/remote-projects.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
ssh_connections = [
{
host = "pureintent";
projects = [
"~/code/ny/nammayatri"
];
}
];
}
Loading

0 comments on commit 941c8a6

Please sign in to comment.