zsh: Change autosuggest strategy and max size

New combined strategy will first gather suggestions from the history,
and if none are found fall back on normal completion options (e.g. `ls `
may suggest files in current dir, etc).

Also changed the max size that completions will use as buffer to 20, so
we don't have auto suggestions for _huge_ scripts anymore.
This commit is contained in:
Marty Oehme 2025-12-08 16:30:11 +01:00
parent e643a2e45d
commit 42f2b034b5
Signed by: Marty
GPG key ID: 4E535BC19C61886E

View file

@ -46,6 +46,9 @@ else # or manually
fi
unset PLUG_FOLDER
ZSH_AUTOSUGGEST_STRATEGY=(history completion)
ZSH_AUTOSUGGEST_BUFFER_MAX_SIZE=20
# simple fzf-tab settings
zstyle ":fzf-tab:*" fzf-flags "--ansi" "--expect='$continuous_trigger,$print_query'" "--color=hl:$(($#headers == 0 ? 108 : 255))" "--nth=2,3" "--layout=reverse" "--height=${FZF_TMUX_HEIGHT:-75%}" "--tiebreak=begin" "-m" "--bind=tab:down,btab:up,change:top,ctrl-space:toggle" "--cycle" "--query=$query" "--header-lines=$#headers" "--print-query"