mirror of
https://github.com/oddlama/nix-config.git
synced 2025-10-11 07:10:39 +02:00
feat: test nushell
This commit is contained in:
parent
bad942c919
commit
449d9a2200
2 changed files with 13 additions and 86 deletions
|
@ -1,78 +1,5 @@
|
|||
{
|
||||
config,
|
||||
pkgs,
|
||||
...
|
||||
}: {
|
||||
programs.zsh = {
|
||||
programs.nushell = {
|
||||
enable = true;
|
||||
enableAutosuggestions = true;
|
||||
enableCompletion = true;
|
||||
enableSyntaxHighlighting = true;
|
||||
enableVteIntegration = pkgs.stdenv.isLinux;
|
||||
autocd = true;
|
||||
dotDir = ".config/zsh";
|
||||
history = {
|
||||
expireDuplicatesFirst = true;
|
||||
extended = true;
|
||||
ignoreDups = true;
|
||||
path = "${config.xdg.dataHome}/zsh/history";
|
||||
save = 10000;
|
||||
share = true;
|
||||
};
|
||||
envExtra = ''
|
||||
export LESSHISTFILE="${config.xdg.dataHome}/less_history"
|
||||
export CARGO_HOME="${config.xdg.cacheHome}/cargo"
|
||||
'';
|
||||
initExtra = ''
|
||||
nix-closure-size() {
|
||||
nix-store -q --size $(nix-store -qR $(${pkgs.coreutils}/bin/readlink -e $1) ) |
|
||||
${pkgs.gawk}/bin/gawk '{ a+=$1 } END { print a }' |
|
||||
${pkgs.coreutils}/bin/numfmt --to=iec-i
|
||||
}
|
||||
bindkey "$${terminfo[khome]}" beginning-of-line
|
||||
bindkey "$${terminfo[kend]}" end-of-line
|
||||
bindkey "$${terminfo[kdch1]}" delete-char
|
||||
bindkey '\eOA' history-substring-search-up
|
||||
bindkey '\eOB' history-substring-search-down
|
||||
bindkey "^[[A" history-substring-search-up
|
||||
bindkey "^[[B" history-substring-search-down
|
||||
bindkey "$$terminfo[kcuu1]" history-substring-search-up
|
||||
bindkey "$$terminfo[kcud1]" history-substring-search-down
|
||||
bindkey "^[[1;5C" forward-word
|
||||
bindkey "^[[1;3C" forward-word
|
||||
bindkey "^[[1;5D" backward-word
|
||||
bindkey "^[[1;3D" backward-word
|
||||
bindkey -s "^O" 'fzf | xargs -r $VISUAL^M'
|
||||
bindkey -rpM viins '^[^['
|
||||
KEYTIMEOUT=1
|
||||
${pkgs.any-nix-shell}/bin/any-nix-shell zsh | source /dev/stdin
|
||||
'';
|
||||
sessionVariables = {
|
||||
RPROMPT = "";
|
||||
};
|
||||
plugins = [
|
||||
{
|
||||
# https://github.com/hlissner/zsh-autopair
|
||||
name = "zsh-autopair";
|
||||
file = "zsh-autopair.plugin.zsh";
|
||||
src = pkgs.fetchFromGitHub {
|
||||
owner = "hlissner";
|
||||
repo = "zsh-autopair";
|
||||
rev = "34a8bca0c18fcf3ab1561caef9790abffc1d3d49";
|
||||
sha256 = "1h0vm2dgrmb8i2pvsgis3lshc5b0ad846836m62y8h3rdb3zmpy1";
|
||||
};
|
||||
}
|
||||
{
|
||||
# https://github.com/zsh-users/zsh-history-substring-search
|
||||
name = "zsh-history-substring-search";
|
||||
file = "zsh-history-substring-search.plugin.zsh";
|
||||
src = pkgs.fetchFromGitHub {
|
||||
owner = "zsh-users";
|
||||
repo = "zsh-history-substring-search";
|
||||
rev = "0f80b8eb3368b46e5e573c1d91ae69eb095db3fb";
|
||||
sha256 = "0y8va5kc2ram38hbk2cibkk64ffrabfv1sh4xm7pjspsba9n5p1y";
|
||||
};
|
||||
}
|
||||
];
|
||||
};
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue