Add autosuggestions

This commit is contained in:
Thomas Avé 2023-06-23 15:42:41 +02:00
parent 298a20c849
commit 3fb0731d4e
4 changed files with 11 additions and 8 deletions

3
.gitmodules vendored
View File

@ -7,3 +7,6 @@
[submodule "zsh/powerlevel10k"]
path = zsh/powerlevel10k
url = https://github.com/romkatv/powerlevel10k.git
[submodule "zsh/zsh-autocomplete"]
path = zsh/zsh-autocomplete
url = https://github.com/marlonrichert/zsh-autocomplete.git

View File

@ -61,7 +61,7 @@ if $ZSH; then
PROFILE=true
dependencies="fzf zsh curl"
if [[ $OS == "NAME=\"Arch Linux\"" ]]; then
$SUDO pacman -Sy --needed --noconfirm $dependencies
$SUDO pacman -Sy --needed --noconfirm $dependencies zsh-autosuggestions
echo "Please manually install yay and autojump-rs"
elif [[ $OS == "NAME=\"Ubuntu\"" ]]; then
$SUDO apt update

View File

@ -68,7 +68,7 @@ zle -N down-line-or-beginning-search
zstyle ':completion:*' matcher-list '' 'm:{a-zA-Z}={A-Za-z}' 'r:|=*' 'l:|=* r:|=*'
zstyle ':completion::complete:*' gain-privileges 1
autoload -Uz compinit && compinit
zstyle ':completion:*' rehash true
if [ -f "/usr/share/doc/pkgfile/command-not-found.zsh" ]; then
@ -84,6 +84,11 @@ elif [ -f "/usr/share/fzf/key-bindings.zsh" ]; then
source /usr/share/fzf/completion.zsh
fi
# Autosuggestions
if [ -f "/usr/share/zsh/plugins/zsh-autosuggestions/zsh-autosuggestions.zsh" ]; then
source /usr/share/zsh/plugins/zsh-autosuggestions/zsh-autosuggestions.zsh
fi
autoload -Uz compinit
compinit -d "$XDG_CACHE_HOME"/zsh/zcompdump-"$ZSH_VERSION"
@ -96,12 +101,6 @@ source $XDG_CONFIG_HOME/zsh/powerlevel10k/powerlevel10k.zsh-theme
# To customize prompt, run `p10k configure` or edit ~/.config/zsh/.p10k.zsh.
[[ ! -f ~/.config/zsh/.p10k.zsh ]] || source ~/.config/zsh/.p10k.zsh
# Preferred editor for local and remote sessions
# if [[ -n $SSH_CONNECTION ]]; then
# else
# export EDITOR='mvim'
# fi
unsetopt share_history
# Compilation flags

1
zsh/zsh-autocomplete Submodule

@ -0,0 +1 @@
Subproject commit e327674284e753c16021976fcbdd178eef2bcdcf