From 8d9a798078e970151bd0cf715d6b18b3024fbcab Mon Sep 17 00:00:00 2001 From: Daniel Lynn Date: Wed, 16 Apr 2025 14:26:03 -0500 Subject: [PATCH] Add some integrations directly with helix --- helix/config.toml | 39 +++++++++++++++++++++++++++++++++++++++ zellij/config.kdl | 2 +- 2 files changed, 40 insertions(+), 1 deletion(-) diff --git a/helix/config.toml b/helix/config.toml index 7748233..1e874a2 100644 --- a/helix/config.toml +++ b/helix/config.toml @@ -28,3 +28,42 @@ _ = { n = ":set whitespace.render none", a = ":set whitespace.render all" } [keys.normal.space] i = ":toggle lsp.display-inlay-hints" + +# Git integration with lazygit +[keys.normal] +C-g = [ + ":write-all", + ":insert-output lazygit >/dev/tty", + ":redraw", + ":reload-all" +] + +# File explorer with yazi +[keys.normal.space] +e = [ + ":sh rm -f /tmp/unique-file-c5140c67", + ":insert-output yazi '%{buffer_name}' --chooser-file=/tmp/unique-file-c5140c67", + ":insert-output echo \"x1b[?1049h\" > /dev/tty", + ":open %sh{cat /tmp/unique-file-c5140c67}", + ":redraw", + ":set mouse false", + ":set mouse true", +] +E = [ + ":sh rm -f /tmp/unique-file-bea21125", + ":insert-output yazi '%{workspace_directory}' --chooser-file=/tmp/unique-file-bea21125", + ":insert-output echo \"x1b[?1049h\" > /dev/tty", + ":open %sh{cat /tmp/unique-file-bea21125}", + ":redraw", + ":set mouse false", + ":set mouse true", +] + +# Search and replace with scooter +[keys.normal] +C-r = [ + ":write-all", + ":insert-output scooter >/dev/tty", + ":redraw", + ":reload-all" +] diff --git a/zellij/config.kdl b/zellij/config.kdl index 637743a..a59beac 100644 --- a/zellij/config.kdl +++ b/zellij/config.kdl @@ -5,7 +5,7 @@ keybinds { // bind "Alt c" { Copy; } } locked { - bind "Ctrl g" { SwitchToMode "Normal"; } + bind "Alt g" { SwitchToMode "Normal"; } } resize { bind "Ctrl n" { SwitchToMode "Normal"; }