sorin-ionescu / prezto

The configuration framework for Zsh
MIT License
14.02k stars 4.49k forks source link

Using module `syntax-highlighting` show an error "maximum nested function level reached" #2061

Closed ntnamazu closed 1 year ago

ntnamazu commented 1 year ago

Description

Loading Prezto module modules/syntax-highlighting with zsh version 5.9 shows an error message "maximum nested function level reached".

Expected behavior

No error message is expected.

Actual behavior

After configuration, the following error message is shown.

~/.zprezto master*
❯ ls
_zsh_autosuggest_highlight_reset:3: maximum nested function level reached; increase FUNCNEST?
modules  runcoms  CONTRIBUTING.md  LICENSE  README.md  init.zsh

Steps to Reproduce

1. Install Zsh 5.9

Install zsh 5.9 by following procedure:

wget https://sourceforge.net/projects/zsh/files/zsh/5.9/zsh-5.9.tar.xz/download -O zsh-5.9.tar.xz
tar xvf zsh-5.9.tar.xz 
cd zsh-5.9/
./configure --enable-multibyte
make
sudo make install

2. Install Prezto

Insstall Prezto by following, the very standard procedure:

https://github.com/sorin-ionescu/prezto#installation

3. Edit .zpreztorc

First add two lines as follows:

zstyle ':prezto:load' pmodule \
  'environment' \
  'terminal' \
  'editor' \
  'history' \
  'directory' \
  'spectrum' \
  'utility' \
  'completion' \
  'history-substring-search' \
+  'syntax-highlighting' \
+  'autosuggestions' \
  'prompt'

And the setting of prompt theme to load is changed as follows:

# Set the prompt theme to load.
# Setting it to 'random' loads a random theme.
# Auto set to 'off' on dumb terminals.
- zstyle ':prezto:module:prompt' theme 'sorin'
+ zstyle ':prezto:module:prompt' theme 'pure'

Versions