From 79e72505f8e682f1b94156148a6b243dafe2d0f6 Mon Sep 17 00:00:00 2001 From: Christoph Schmatzler Date: Wed, 4 Feb 2026 10:17:34 +0000 Subject: [PATCH] Add Zed remote development setup with vim keybindings --- hosts/chidi/default.nix | 1 + hosts/jason/default.nix | 1 + hosts/tahani/default.nix | 1 + profiles/zed-server.nix | 5 ++ profiles/zed.nix | 119 +++++++++++++++++++++++++++++++++++++++ 5 files changed, 127 insertions(+) create mode 100644 profiles/zed-server.nix create mode 100644 profiles/zed.nix diff --git a/hosts/chidi/default.nix b/hosts/chidi/default.nix index 7a679ca..1ba891c 100644 --- a/hosts/chidi/default.nix +++ b/hosts/chidi/default.nix @@ -43,6 +43,7 @@ ../../profiles/starship.nix ../../profiles/zk.nix ../../profiles/zoxide.nix + ../../profiles/zed.nix ../../profiles/zsh.nix inputs.nixvim.homeModules.nixvim ]; diff --git a/hosts/jason/default.nix b/hosts/jason/default.nix index 61b7f15..b5efd42 100644 --- a/hosts/jason/default.nix +++ b/hosts/jason/default.nix @@ -42,6 +42,7 @@ ../../profiles/starship.nix ../../profiles/zk.nix ../../profiles/zoxide.nix + ../../profiles/zed.nix ../../profiles/zsh.nix inputs.nixvim.homeModules.nixvim ]; diff --git a/hosts/tahani/default.nix b/hosts/tahani/default.nix index 368f2bb..ef546d7 100644 --- a/hosts/tahani/default.nix +++ b/hosts/tahani/default.nix @@ -43,6 +43,7 @@ ../../profiles/starship.nix ../../profiles/zk.nix ../../profiles/zoxide.nix + ../../profiles/zed-server.nix ../../profiles/zsh.nix inputs.nixvim.homeModules.nixvim ]; diff --git a/profiles/zed-server.nix b/profiles/zed-server.nix new file mode 100644 index 0000000..4095f48 --- /dev/null +++ b/profiles/zed-server.nix @@ -0,0 +1,5 @@ +{pkgs, ...}: { + home.packages = with pkgs; [ + zed-editor + ]; +} diff --git a/profiles/zed.nix b/profiles/zed.nix new file mode 100644 index 0000000..c640776 --- /dev/null +++ b/profiles/zed.nix @@ -0,0 +1,119 @@ +{ + pkgs, + lib, + user, + ... +}: { + programs.zed-editor = { + enable = true; + extensions = [ + "catppuccin" + "catppuccin-icons" + "nix" + "elixir" + "html" + "toml" + "sql" + "dockerfile" + "make" + "git-firefly" + ]; + userSettings = { + vim_mode = true; + ui_font_size = 16; + buffer_font_size = 16; + buffer_font_family = "TX-02"; + theme = { + mode = "system"; + light = "Catppuccin Latte"; + dark = "Catppuccin Mocha"; + }; + icon_theme = "Catppuccin Latte"; + tab_bar = { + show = false; + }; + toolbar = { + breadcrumbs = false; + quick_actions = false; + selections_menu = false; + }; + scrollbar = { + show = "never"; + }; + indent_guides = { + enabled = true; + coloring = "indent_aware"; + }; + inlay_hints = { + enabled = true; + }; + project_panel = { + button = false; + }; + outline_panel = { + button = false; + }; + collaboration_panel = { + button = false; + }; + notification_panel = { + button = false; + }; + chat_panel = { + button = false; + }; + assistant = { + enabled = false; + button = false; + }; + features = { + edit_prediction_provider = "none"; + }; + ssh_connections = [ + { + host = "tahani"; + projects = []; + } + ]; + }; + userKeymaps = [ + { + context = "Editor && VimControl && !VimWaiting && !menu"; + bindings = { + "space f f" = "file_finder::Toggle"; + "space f g" = "pane::DeploySearch"; + "space e" = "workspace::ToggleLeftDock"; + "space b d" = "pane::CloseActiveItem"; + "space b n" = "pane::ActivateNextItem"; + "space b p" = "pane::ActivatePrevItem"; + "space q" = "workspace::CloseWindow"; + "space w v" = "pane::SplitRight"; + "space w s" = "pane::SplitDown"; + "ctrl-h" = ["workspace::ActivatePaneInDirection" "Left"]; + "ctrl-l" = ["workspace::ActivatePaneInDirection" "Right"]; + "ctrl-j" = ["workspace::ActivatePaneInDirection" "Down"]; + "ctrl-k" = ["workspace::ActivatePaneInDirection" "Up"]; + "g r" = "editor::FindAllReferences"; + }; + } + { + context = "Editor && vim_mode == insert"; + bindings = { + "j k" = "vim::NormalBefore"; + }; + } + { + context = "ProjectPanel && not_editing"; + bindings = { + "a" = "project_panel::NewFile"; + "A" = "project_panel::NewDirectory"; + "r" = "project_panel::Rename"; + "d" = "project_panel::Delete"; + "x" = "project_panel::Cut"; + "y" = "project_panel::Copy"; + "p" = "project_panel::Paste"; + }; + } + ]; + }; +}