38 lines
1.5 KiB
Bash
38 lines
1.5 KiB
Bash
# Enable Powerlevel10k instant prompt. Should stay close to the top of ~/.config/zsh/.zshrc.
|
|
# Initialization code that may require console input (password prompts, [y/n]
|
|
# confirmations, etc.) must go above this block; everything else may go below.
|
|
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
|
|
|
|
# ~/.config/zsh/.zshrc - Main zsh configuration
|
|
# Modular framework using prezto, fzf, and system plugins
|
|
|
|
# --- Prezto ---
|
|
export POWERLEVEL9K_CONFIG_FILE="$ZDOTDIR/p10k/p10k.zsh"
|
|
source "${ZDOTDIR:-$HOME}/.zprezto/init.zsh"
|
|
|
|
# --- System plugins ---
|
|
# zsh-autosuggestions
|
|
if [[ -f /usr/share/zsh/plugins/zsh-autosuggestions/zsh-autosuggestions.zsh ]]; then
|
|
source /usr/share/zsh/plugins/zsh-autosuggestions/zsh-autosuggestions.zsh
|
|
ZSH_AUTOSUGGEST_STRATEGY=(history completion)
|
|
ZSH_AUTOSUGGEST_HIGHLIGHT_STYLE="fg=244"
|
|
fi
|
|
|
|
# --- Modular config ---
|
|
for conf in "$ZDOTDIR"/conf.d/*.zsh(N); do
|
|
source "$conf"
|
|
done
|
|
|
|
# --- Local overrides ---
|
|
[[ -f ~/.env.zsh ]] && source ~/.env.zsh
|
|
|
|
# --- zsh-syntax-highlighting (must be sourced last) ---
|
|
if [[ -f /usr/share/zsh/plugins/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh ]]; then
|
|
source /usr/share/zsh/plugins/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh
|
|
fi
|
|
|
|
# To customize prompt, run `p10k configure` or edit ~/.config/zsh/p10k/p10k.zsh.
|
|
[[ ! -f ~/.config/zsh/p10k/p10k.zsh ]] || source ~/.config/zsh/p10k/p10k.zsh
|