2024-08-01 18:27:47 +00:00
|
|
|
{ pkgs, ... }:
|
2024-08-19 15:40:24 +00:00
|
|
|
let
|
|
|
|
zed-fhs = pkgs.buildFHSUserEnv {
|
|
|
|
name = "zed";
|
2024-08-20 02:38:32 +00:00
|
|
|
targetPkgs =
|
|
|
|
pkgs: with pkgs; [
|
|
|
|
zed-editor
|
|
|
|
nixd
|
|
|
|
];
|
2024-08-19 15:40:24 +00:00
|
|
|
runScript = "zed";
|
|
|
|
};
|
|
|
|
in
|
2024-08-01 18:27:47 +00:00
|
|
|
{
|
2024-08-19 15:40:24 +00:00
|
|
|
home.packages = [ zed-fhs ];
|
|
|
|
xdg.configFile = {
|
|
|
|
"zed/settings.json".text = builtins.toJSON {
|
|
|
|
buffer_font_family = "Monaspace Neon";
|
2024-08-20 02:38:32 +00:00
|
|
|
buffer_font_size = 13;
|
2024-08-19 15:40:24 +00:00
|
|
|
soft_wrap = "editor_width";
|
|
|
|
telemetry = {
|
|
|
|
diagnostics = false;
|
|
|
|
metrics = false;
|
|
|
|
};
|
|
|
|
terminal = {
|
|
|
|
font_family = "Monaspace Neon";
|
|
|
|
shell = {
|
|
|
|
program = "nu";
|
|
|
|
};
|
|
|
|
};
|
|
|
|
theme = "Catppuccin Mocha";
|
2024-08-20 02:38:32 +00:00
|
|
|
ui_font_size = 15;
|
2024-09-23 23:29:03 +00:00
|
|
|
vim_mode = false;
|
2024-08-19 15:40:24 +00:00
|
|
|
relative_line_numbers = true;
|
|
|
|
vim = {
|
|
|
|
use_system_clipboard = "always";
|
|
|
|
use_multiline_find = true;
|
|
|
|
};
|
|
|
|
tab_bar.show = false;
|
|
|
|
toolbar = {
|
|
|
|
breadcrumbs = true;
|
|
|
|
quick_actions = false;
|
|
|
|
};
|
|
|
|
assistant = {
|
|
|
|
version = "1";
|
|
|
|
provider.name = "anthropic";
|
2024-08-01 18:27:47 +00:00
|
|
|
};
|
2024-05-15 19:39:42 +00:00
|
|
|
};
|
2024-08-19 15:40:24 +00:00
|
|
|
"zed/keymap.json".text =
|
|
|
|
let
|
|
|
|
leader = "space";
|
|
|
|
in
|
|
|
|
builtins.toJSON [
|
|
|
|
{
|
|
|
|
"context" = "Dock || Terminal || Editor";
|
|
|
|
"bindings" = {
|
|
|
|
"ctrl-h" = [
|
|
|
|
"workspace::ActivatePaneInDirection"
|
|
|
|
"Left"
|
|
|
|
];
|
|
|
|
"ctrl-l" = [
|
|
|
|
"workspace::ActivatePaneInDirection"
|
|
|
|
"Right"
|
|
|
|
];
|
|
|
|
"ctrl-k" = [
|
|
|
|
"workspace::ActivatePaneInDirection"
|
|
|
|
"Up"
|
|
|
|
];
|
|
|
|
"ctrl-j" = [
|
|
|
|
"workspace::ActivatePaneInDirection"
|
|
|
|
"Down"
|
|
|
|
];
|
|
|
|
};
|
|
|
|
}
|
|
|
|
{
|
|
|
|
"context" = "Editor && VimControl && !VimWaiting && !menu";
|
|
|
|
"bindings" = {
|
|
|
|
"${leader} b" = "editor::ToggleGitBlame";
|
|
|
|
"${leader} k" = "editor::Hover";
|
|
|
|
"${leader} a" = "editor::ToggleCodeActions";
|
|
|
|
"${leader} l f" = "editor::Format";
|
|
|
|
"${leader} d" = "diagnostics::Deploy";
|
|
|
|
"${leader} f" = "file_finder::Toggle";
|
|
|
|
"${leader} o" = "tab_switcher::Toggle";
|
|
|
|
"${leader} e" = "workspace::ToggleLeftDock";
|
|
|
|
"${leader} /" = "workspace::NewSearch";
|
|
|
|
"n" = "search::SelectNextMatch";
|
|
|
|
"shift-n" = "search::SelectPrevMatch";
|
|
|
|
"${leader} t" = "workspace::NewCenterTerminal";
|
|
|
|
"${leader} c" = "editor::ToggleComments";
|
|
|
|
"${leader} w" = "workspace::Save";
|
|
|
|
};
|
|
|
|
}
|
|
|
|
{
|
|
|
|
"context" = "Editor && vim_mode == visual && !VimWaiting && !VimObject";
|
|
|
|
"bindings" = {
|
|
|
|
"shift-j" = "editor::MoveLineDown";
|
|
|
|
"shift-k" = "editor::MoveLineUp";
|
|
|
|
};
|
|
|
|
}
|
|
|
|
{
|
|
|
|
"context" = "Workspace";
|
|
|
|
"bindings" = {
|
|
|
|
"ctrl-z" = "workspace::ToggleZoom";
|
|
|
|
"cmd-k" = [
|
|
|
|
"projects::OpenRecent"
|
|
|
|
{ "create_new_window" = false; }
|
|
|
|
];
|
|
|
|
"ctrl-x" = "tab_switcher::CloseSelectedItem";
|
|
|
|
};
|
|
|
|
}
|
|
|
|
{
|
|
|
|
"context" = "Terminal";
|
|
|
|
"bindings" = {
|
|
|
|
"cmd-t" = "workspace::NewTerminal";
|
|
|
|
};
|
|
|
|
}
|
|
|
|
];
|
2024-05-15 19:39:42 +00:00
|
|
|
};
|
|
|
|
}
|