Merge branch 'main' of codeberg.org:Lillian-Violet/NixOS-Config
This commit is contained in:
commit
f9471f0bcf
12 changed files with 203 additions and 175 deletions
|
@ -3,13 +3,33 @@
|
|||
lib,
|
||||
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 = {
|
||||
enable = true;
|
||||
defaultEditor = true;
|
||||
|
||||
settings = {
|
||||
# theme = "catppuccin_macchiato"; # Don't need this because the module themes it for us
|
||||
keys.normal.backspace = {
|
||||
b = ":sh zellij run -f -n 'build code' -- direnv exec . just build";
|
||||
r = ":sh zellij run -f -n 'run code' -- direnv exec . just run";
|
||||
t = ":sh zellij run -f -n 'test code' -- direnv exec . just test";
|
||||
g = ":sh zellij run -fc -n 'lazygit' -- lazygit";
|
||||
f = ":sh zellij run --floating -n 'yazi picker' -- zsh ~/.config/helix/open_in_helix_from_yazi.zsh ";
|
||||
};
|
||||
editor = {
|
||||
line-number = "relative";
|
||||
lsp.display-messages = true;
|
||||
|
@ -158,4 +178,11 @@
|
|||
target = ".config/helix/external-snippets.toml";
|
||||
};
|
||||
};
|
||||
|
||||
home.file = {
|
||||
"yazi" = {
|
||||
source = "${yazi}";
|
||||
target = ".config/helix/open_in_helix_from_yazi.zsh";
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
|
@ -67,10 +67,11 @@
|
|||
"zsh-navigation-tools"
|
||||
];
|
||||
};
|
||||
# stuff for zoxide & tre
|
||||
# Extra commands that take more complex forms
|
||||
initExtra = ''
|
||||
eval "$(zoxide init --cmd cd zsh)"
|
||||
tre() { command tre "$@" -e && source "/tmp/tre_aliases_$USER" 2>/dev/null; }
|
||||
zhx() { command zellij action new-tab --layout $HOME/.config/zellij/layouts/helix.kdl; }
|
||||
'';
|
||||
};
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue