Update ZSH configurations

This commit is contained in:
Fabio Scotto di Santolo
2024-12-31 14:28:21 +01:00
parent 9aea1168ab
commit 2d60b7f1c3
4 changed files with 22 additions and 14 deletions

View File

@@ -0,0 +1,5 @@
#!/usr/bin/env bash
if [ -e "$HOME/.cargo" ]; then
source "$HOME/.cargo/env"
fi

View File

@@ -1,13 +0,0 @@
#!/usr/bin/env bash
case $(uname -s) in
"Darwin")
export ZSH_HIGHLIGHT_DIR=/opt/homebrew/share/zsh-syntax-highlighting
export ZSH_HIGHLIGHT_HIGHLIGHTERS_DIR=/opt/homebrew/share/zsh-syntax-highlighting/highlighters
;;
"Linux")
export ZSH_HIGHLIGHT_DIR=/usr/share/zsh-syntax-highlighting
export ZSH_HIGHLIGHT_HIGHLIGHTERS_DIR=/usr/share/zsh-syntax-highlighting/highlighters
export ZSH_AUTOSUGGESTIONS_DIR=/usr/share/zsh-autosuggestions
;;
esac

View File

@@ -9,3 +9,7 @@ if command -v oh-my-posh > /dev/null 2>&1; then
# Initialize Oh My Posh # Initialize Oh My Posh
eval "$(oh-my-posh init zsh --config "$(brew --prefix oh-my-posh)/themes/peru.omp.json")" eval "$(oh-my-posh init zsh --config "$(brew --prefix oh-my-posh)/themes/peru.omp.json")"
fi fi
export VIRTUAL_ENV_DISABLE_PROMPT=1
export EDITOR=nvim
export HOMEBREW_NO_ENV_HINTS=1

View File

@@ -149,5 +149,17 @@ fpath=(~/.zsh $fpath)
autoload run-help autoload run-help
autoload -Uz compinit && compinit -u autoload -Uz compinit && compinit -u
case $(uname -s) in
"Darwin")
export ZSH_HIGHLIGHT_DIR=/opt/homebrew/share/zsh-syntax-highlighting
export ZSH_HIGHLIGHT_HIGHLIGHTERS_DIR=/opt/homebrew/share/zsh-syntax-highlighting/highlighters
;;
"Linux")
export ZSH_HIGHLIGHT_DIR=/usr/share/zsh-syntax-highlighting
export ZSH_HIGHLIGHT_HIGHLIGHTERS_DIR=/usr/share/zsh-syntax-highlighting/highlighters
export ZSH_AUTOSUGGESTIONS_DIR=/usr/share/zsh-autosuggestions
;;
esac
source "$ZSH_HIGHLIGHT_DIR/zsh-syntax-highlighting.zsh" source "$ZSH_HIGHLIGHT_DIR/zsh-syntax-highlighting.zsh"
source "$ZSH_AUTOSUGGESTIONS_DIR/zsh-autosuggestions.zsh" source "$ZSH_AUTOSUGGESTIONS_DIR/zsh-autosuggestions.zsh"