-
Notifications
You must be signed in to change notification settings - Fork 0
/
rc.zsh
55 lines (43 loc) · 1.58 KB
/
rc.zsh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
# Load modules
autoload -U colors && colors
autoload -U promptinit && promptinit
autoload -U compinit && compinit
# Styling
zstyle ':completion:*' menu select
# History cache
HISTSIZE=10000
SAVEHIST=10000
[ ! -d ~/.cache/zsh ] && mkdir -p ~/.cache/zsh
HISTFILE=~/.cache/zsh/history
setopt share_history
# Tab completion
zmodload zsh/complist
_comp_options+=(globdots)
# Export PATH environmental variable
export PATH="$PATH:$HOME/.local/bin:$HOME/.local/scripts"
function source_if_exists() {
[[ -f $1 ]] && source $1
}
source_if_exists "$HOME/.config/zsh/env.zsh"
source_if_exists "$HOME/.config/zsh/brew.zsh"
source_if_exists "$HOME/.config/zsh/starship.zsh"
source_if_exists "$HOME/.config/zsh/cargo.zsh"
source_if_exists "$HOME/.config/zsh/keybindings.zsh"
source_if_exists "$HOME/.config/zsh/aliases.zsh"
source_if_exists "$HOME/.config/zsh/yazi.zsh"
source_if_exists "$HOME/.config/zsh/pnpm.zsh"
source_if_exists "$HOME/.config/zsh/templates.zsh"
# Set syntax highlighting
[[ -f /usr/share/zsh/plugins/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh ]] && \
source /usr/share/zsh/plugins/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh 2>/dev/null
# Auto suggestion
[[ -f /usr/share/zsh/plugins/zsh-autosuggestions/zsh-autosuggestions.zsh ]] && \
source /usr/share/zsh/plugins/zsh-autosuggestions/zsh-autosuggestions.zsh 2>/dev/null
# bun completions
[ -s "/Users/lollo/.bun/_bun" ] && source "/Users/lollo/.bun/_bun"
# bun
export BUN_INSTALL="$HOME/.bun"
export PATH="$BUN_INSTALL/bin:$PATH"
export PATH="/opt/homebrew/opt/llvm/bin:$PATH"
# fzf
[ -f ~/.fzf.zsh ] && source ~/.fzf.zsh