added yazi as a fancy file picker to helix with a simple backspace + f command :)
This commit is contained in:
parent
7b8d516b6a
commit
cb87a12ad2
|
@ -34,6 +34,7 @@
|
||||||
broot
|
broot
|
||||||
lazygit
|
lazygit
|
||||||
navi
|
navi
|
||||||
|
yazi
|
||||||
];
|
];
|
||||||
programs.navi.enable = true;
|
programs.navi.enable = true;
|
||||||
}
|
}
|
||||||
|
|
|
@ -3,7 +3,20 @@
|
||||||
lib,
|
lib,
|
||||||
pkgs,
|
pkgs,
|
||||||
...
|
...
|
||||||
}: {
|
}: let
|
||||||
|
yazi =
|
||||||
|
pkgs.writeText "open_in_helix_from_yazi.zsh"
|
||||||
|
''
|
||||||
|
#! ~/.nix-profile/bin/zsh
|
||||||
|
files=(''${(fqq)"$( yazi --chooser-file=/dev/stdout | cat )"})
|
||||||
|
zellij action toggle-floating-panes
|
||||||
|
zellij action write 27 # send escape-key
|
||||||
|
zellij action write-chars ":open $files"
|
||||||
|
zellij action write 13 # send enter-key
|
||||||
|
zellij action toggle-floating-panes
|
||||||
|
zellij action close-pane
|
||||||
|
'';
|
||||||
|
in {
|
||||||
programs.helix = {
|
programs.helix = {
|
||||||
enable = true;
|
enable = true;
|
||||||
defaultEditor = true;
|
defaultEditor = true;
|
||||||
|
@ -11,11 +24,11 @@
|
||||||
settings = {
|
settings = {
|
||||||
# theme = "catppuccin_macchiato"; # Don't need this because the module themes it for us
|
# theme = "catppuccin_macchiato"; # Don't need this because the module themes it for us
|
||||||
keys.normal.backspace = {
|
keys.normal.backspace = {
|
||||||
b = ":run-shell-command zellij run -f -- direnv exec . just build";
|
b = ":sh zellij run -f -n 'build code' -- direnv exec . just build";
|
||||||
r = ":run-shell-command zellij run -f -- direnv exec . just run";
|
r = ":sh zellij run -f -n 'run code' -- direnv exec . just run";
|
||||||
t = ":run-shell-command zellij run -f -- direnv exec . just test";
|
t = ":sh zellij run -f -n 'test code' -- direnv exec . just test";
|
||||||
g = ":run-shell-command zellij run -fc -- lazygit";
|
g = ":sh zellij run -fc -n 'lazygit' -- lazygit";
|
||||||
f = ":run-shell-command zellij run -fc -- broot";
|
f = ":sh zellij run --floating -n 'yazi picker' -- zsh ~/.config/helix/open_in_helix_from_yazi.zsh ";
|
||||||
};
|
};
|
||||||
editor = {
|
editor = {
|
||||||
line-number = "relative";
|
line-number = "relative";
|
||||||
|
@ -165,4 +178,11 @@
|
||||||
target = ".config/helix/external-snippets.toml";
|
target = ".config/helix/external-snippets.toml";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
home.file = {
|
||||||
|
"yazi" = {
|
||||||
|
source = "${yazi}";
|
||||||
|
target = ".config/helix/open_in_helix_from_yazi.zsh";
|
||||||
|
};
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -67,7 +67,7 @@
|
||||||
"zsh-navigation-tools"
|
"zsh-navigation-tools"
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
# stuff for zoxide & tre
|
# Extra commands that take more complex forms
|
||||||
initExtra = ''
|
initExtra = ''
|
||||||
eval "$(zoxide init --cmd cd zsh)"
|
eval "$(zoxide init --cmd cd zsh)"
|
||||||
tre() { command tre "$@" -e && source "/tmp/tre_aliases_$USER" 2>/dev/null; }
|
tre() { command tre "$@" -e && source "/tmp/tre_aliases_$USER" 2>/dev/null; }
|
||||||
|
|
Loading…
Reference in a new issue