Commit 8af9f97
Changed files (3)
modules
dev
modules/dev/zed/default.nix
@@ -54,6 +54,7 @@
colorize_brackets = true;
window_decorations = "client"; # Use CSD because niri can't find zed when using SSD.
collaboration_panel.button = false;
+ git_panel.button = false; # I use JJUI instead.
which_key = {
enabled = true;
delay_ms = 0;
modules/dev/zed/keymap.nix
@@ -1,28 +1,41 @@
-{
- flake.modules.homeManager.dev-zed = _: {
+{lib, ...}: {
+ flake.modules.homeManager.dev-zed = {config, ...}: {
programs.zed-editor = {
userSettings.helix_mode = true;
- userKeymaps = [
- {
- context = "((vim_mode == helix_normal || vim_mode == helix_select) && !menu)";
+ userKeymaps =
+ [
+ {
+ context = "((vim_mode == helix_normal || vim_mode == helix_select) && !menu)";
+ bindings = {
+ "space e" = "project_panel::ToggleFocus";
+ };
+ }
+ {
+ context = "ProjectPanel && not_editing";
+ bindings = {
+ # I prefered yazi's default keybinding
+ "a" = "project_panel::NewFile";
+ "d" = "project_panel::Delete";
+ "y" = "project_panel::Copy";
+ "x" = "project_panel::Cut";
+ "p" = "project_panel::Paste";
+ "r" = "project_panel::Rename";
+ };
+ }
+ ]
+ ++ (lib.optional (config.programs.jjui.enable) {
+ context = "Workspace";
bindings = {
- "space e" = "project_panel::ToggleFocus";
+ "ctrl-shift-g" = [
+ "task::Spawn"
+ {
+ task_name = "JJUI";
+ reveal_target = "center";
+ }
+ ];
};
- }
- {
- context = "ProjectPanel && not_editing";
- bindings = {
- # I prefered yazi's default keybinding
- "a" = "project_panel::NewFile";
- "d" = "project_panel::Delete";
- "y" = "project_panel::Copy";
- "x" = "project_panel::Cut";
- "p" = "project_panel::Paste";
- "r" = "project_panel::Rename";
- };
- }
- ];
+ });
};
};
}
modules/dev/zed/tasks.nix
@@ -0,0 +1,17 @@
+{lib, ...}: {
+ flake.modules.homeManager.dev-zed = {config, ...}: {
+ programs.zed-editor.userTasks =
+ []
+ ++ (lib.optional (config.programs.jjui.enable) {
+ label = "JJUI";
+ command = "jjui";
+ shell.program = "sh";
+ hide = "on_success";
+ reveal_target = "center";
+ show_summary = false;
+ show_command = false;
+ allow_concurrent_runs = true;
+ use_new_terminal = true;
+ });
+ };
+}