summaryrefslogtreecommitdiff
path: root/shells/.config/zsh/zshrc
blob: 833aadf4a9585853436cbb5a81edbe71df3974c6 (plain)
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
# Common configs
source $HOME/.config/shells/shellsrc

# Syntax highlighting
source /usr/share/zsh/plugins/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh

# Colors settings
autoload -U colors && colors

# Completion
autoload -U compinit
zstyle ':completion:*' menu select
zmodload zsh/complist
compinit
_comp_options+=(globdots)

bindkey -M menuselect 'h' vi-backward-char
bindkey -M menuselect 'k' vi-up-line-or-history
bindkey -M menuselect 'l' vi-forward-char
bindkey -M menuselect 'j' vi-down-line-or-history
bindkey -v '^?' backward-delete-char

# Vi mode
bindkey -v

# Key bindings
bindkey -s '^o' 'lf\n'
bindkey -s '^v' 'v\n'

# Fix Cursor Shape After Using Neovim
zle-line-init() {
    echo -e -n "\x1b[\x34 q"
}
zle -N zle-line-init
echo -e -n "\x1b[\x34 q"
preexec() { echo -e -n "\x1b[\x34 q" ;}

# Eval Zoxide
eval "$(zoxide init zsh)"

# Eval FZF
source <(fzf --zsh)

# Prompt
eval "$(starship init zsh)"