sindresorhus / pure

Pretty, minimal and fast ZSH prompt
MIT License
13.2k stars 978 forks source link

Error message on every command: _zsh_autosuggest_highlight_reset:3: maximum nested function level reached; increase FUNCNEST? #574

Closed diegosanz closed 4 years ago

diegosanz commented 4 years ago

General information

System report (output of prompt_pure_system_report):

Other information

mafredri commented 4 years ago

This doesn't look like a Pure issue, perhaps you can take a look at what order zsh-autosuggest and pure is being activated?

diegosanz commented 4 years ago

Hi @mafredri , I'm not sure how to check if zsh-autosuggest is working. I can confirm that pure is working because the prompt changes.

In .zimrc I have this line: zmodule sindresorhus/pure --source async.zsh --source pure.zsh. If I comment replace it by zmodule sindresorhus/pure --source async.zsh, removing --source pure.zsh the error message disspaear and obviously pure dissapear too.

FUNCNEST it's a system's variable, right? If I execute echo $FUNCNEST it returns 500. Should I increase it?

Thanks for your help! :)

mafredri commented 4 years ago

I was referring to the fact that the error you are seeing comes from zsh-autosuggest, so look at how you are loading that. Perhaps you need to do it after Pure, or something.

diegosanz commented 4 years ago

I found my error. My .zimrc was the original created by zim, with the following content:

# Start configuration added by Zim install {{{
# -------
# Modules
# -------

# Sets sane Zsh built-in environment options.
zmodule environment
# Provides handy git aliases and functions.
zmodule git
# Applies correct bindkeys for input events.
zmodule input
# Sets a custom terminal title.
zmodule termtitle
# Utility aliases and functions. Adds colour to ls, grep and less.
zmodule utility

#
# Prompt
#
# Exposes git repository status information to prompts.
zmodule git-info
# A customizable version of steeef's prompt theme.
zmodule steeef

# Additional completion definitions for Zsh.
zmodule zsh-users/zsh-completions
# Enables and configures smart and extensive tab completion.
# completion must be sourced after zsh-users/zsh-completions
zmodule completion
# Fish-like autosuggestions for Zsh.
zmodule zsh-users/zsh-autosuggestions
# Fish-like syntax highlighting for Zsh.
# zsh-users/zsh-syntax-highlighting must be sourced after completion
zmodule zsh-users/zsh-syntax-highlighting
# Fish-like history search (up arrow) for Zsh.
# zsh-users/zsh-history-substring-search must be sourced after zsh-users/zsh-syntax-highlighting
zmodule zsh-users/zsh-history-substring-search
# }}} End configuration added by Zim install

I replaced the line zmodule steeef by zmodule sindresorhus/pure --source async.zsh --source pure.zsh and it works perfectly.

Thank you @mafredri for your help!