Add carapace completion, remove fish and zsh

This commit is contained in:
Evie Litherland-Smith 2024-09-21 05:46:36 +01:00
parent c4cff3085e
commit 465bfc101d
2 changed files with 1 additions and 63 deletions

View file

@ -17,8 +17,8 @@
];
programs = {
bash.enable = true;
carapace.enable = true;
fastfetch.enable = true;
fish.enable = true;
fd.enable = true;
jq.enable = true;
nix-index.enable = true;
@ -97,36 +97,5 @@
copy_on_select = true;
};
};
zsh = {
enable = true;
enableCompletion = true;
autocd = true;
autosuggestion.enable = true;
defaultKeymap = "emacs";
syntaxHighlighting = {
enable = true;
highlighters = [
"brackets"
"cursor"
];
};
historySubstringSearch.enable = true;
history = {
extended = true;
share = true;
ignoreDups = true;
ignoreAllDups = true;
ignoreSpace = true;
expireDuplicatesFirst = true;
};
initExtra = ''
## completion config and styling
zstyle ':completion:*' matcher-list 'm:{a-z}={A-Za-z}'
zstyle ':completion:*' menu 'select=long-list'
## transient prompt
source ${./transient.zsh}
'';
};
};
}

View file

@ -1,31 +0,0 @@
#!/usr/bin/env zsh
zle-line-init() {
emulate -L zsh
[[ $CONTEXT == start ]] || return 0
while true; do
zle .recursive-edit
local -i ret=$?
[[ $ret == 0 && $KEYS == $'\4' ]] || break
[[ -o ignore_eof ]] || exit 0
done
local saved_prompt=$PROMPT
local saved_rprompt=$RPROMPT
PROMPT='󰁔 '
RPROMPT=''
zle .reset-prompt
PROMPT=$saved_prompt
RPROMPT=$saved_rprompt
if ((ret)); then
zle .send-break
else
zle .accept-line
fi
return ret
}
zle -N zle-line-init