zsh-users / zsh-autosuggestions

Fish-like autosuggestions for zsh
MIT License
30.33k stars 1.85k forks source link

Literally can't type #742

Open TheBearodactyl opened 1 year ago

TheBearodactyl commented 1 year ago

Bug: "_zsh_autosuggest_invoke_original_widget:14: maximum nested function level reached; increase FUNCNEST?" is output every time i type

How to recreate: Literally try to type anything

my zshrc:

if [[ -r "${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-${(%):-%n}.zsh" ]]; then
  source "${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-${(%):-%n}.zsh"
fi

# owo
source ~/.junk-drawer/zsh/zplug.zsh
source ~/.junk-drawer/zsh/aliases.zsh
source ~/.junk-drawer/zsh/vars.zsh
source ~/.junk-drawer/zsh/keys.zsh
rld

[[ ! -f ~/.p10k.zsh ]] || source ~/.p10k.zsh

rld is just an alias for clear && pfetch && exa -a --git --icons --group-directories-first btw

ericfreese commented 1 year ago

Please narrow down what from your zshrc is causing the issue. You can comment out blocks of it at a time and run exec zsh to load a zsh shell with the modified zshrc file. To run with no zshrc at all, you can run zsh -df and then source this plugin manually.

TheBearodactyl commented 1 year ago

Please narrow down what from your zshrc is causing the issue. You can comment out blocks of it at a time and run exec zsh to load a zsh shell with the modified zshrc file. To run with no zshrc at all, you can run zsh -df and then source this plugin manually.

I tried a fresh install of zsh with this plugin only and it still does this. also, I realize that my zshrc isn't really very helpful, so here's the contents of each file it sources (this is from before I tried a fresh install btw):

zplug.zsh

source ~/.zplug/init.zsh

zplug "zsh-users/zsh-syntax-highlighting", defer:2
zplug "zsh-users/zsh-autosuggestions", defer:2

if ! zplug check --verbose; then
    printf "Install? [y/N]: "
    if read -q; then
        echo; zplug install
    fi
fi

zplug load

aliases.zsh

# aliases
alias rld="clear && pfetch && exa -a --git --icons --group-directories-first"
alias h="cd ~ && rld"
alias j="cd ~/.junk-drawer && rld"
alias pacman="sudo pacman"
alias cp="cp -r"
alias rm="rm -r --preserve-root"
alias pacman-key="sudo pacman-key"
alias pacin="pacman -Sy"
alias pacse="pacman -Ss"
alias pacup="pacman -Syyuu"
alias paclean="pacman -Scc"

# functions
function mkcd() {
  mkdir -p "$1"
  cd "$1"
  rld
}

vars.zsh

# path
path+=('~/.junk-drawer/apps/bins')
path+=('~/.cargo/bin')
path+=('~/.local/bin')

# vars
export HISTFILE=~/.junk-drawer/zsh/zhist
export HISTSIZE=100000000
export SAVEHIST=100000000

# options
setopt HIST_IGNORE_ALL_DUPS
setopt HIST_SAVE_NO_DUPS
setopt HIST_REDUCE_BLANKS 
setopt INC_APPEND_HISTORY_TIME
setopt EXTENDED_HISTORY

keys.zsh

# keys
bindkey '^[[H' beginning-of-line
bindkey '^[[F' end-of-line
bindkey '^[[3~' delete-char

hope this helps

ahmaadaziz commented 1 year ago

I got the same problem but only when I was using history and completion as the auto suggest strategy. I temporarily fixed by removing completion from the strategies.

Bear in mind that I am using windows and have zsh and ohmyzsh installed on GitBash.