diff --git a/zsh/.zshrc b/zsh/.zshrc index cd79637..f3d1ff5 100644 --- a/zsh/.zshrc +++ b/zsh/.zshrc @@ -8,42 +8,49 @@ # # ***************************************************************************** -# Oh My Zsh Configuration: +# Zsh Options: +HISTFILE=~/.zsh_history +HISTSIZE=1000 +SAVEHIST=5000 +KEYTIMEOUT=1 +setopt extendedglob +unsetopt beep + +# Completions: +zstyle ':completion:*' completer _complete _ignored _correct _approximate +zstyle ':completion:*' list-colors ${(s.:.)LS_COLORS} +zstyle ':completion:*' matcher-list '' 'm:{[:lower:]}={[:upper:]} l:|=* r:|=*' 'r:|[._-]=** r:|=**' +zstyle ':completion:*' max-errors 1 +zstyle ':completion:*' menu select=long +zstyle ':completion:*' prompt 'Completions:' +zstyle ':completion:*' select-prompt %SScrolling active: current selection at %p%s +zstyle :compinstall filename '/home/siddhartha/.zshrc' +autoload -Uz compinit +compinit +zmodload -i zsh/complist -# Path to the Oh My Zsh installation. -export ZSH="${HOME}/.oh-my-zsh" - -# Set Oh My Zsh theme. -ZSH_THEME="agnoster-short" - -# Uncomment the following line to change how often to auto-update (in days). -export UPDATE_ZSH_DAYS=30 - -# Enable command auto-correction. -ENABLE_CORRECTION="true" - -# Display red dots whilst waiting for completion. -COMPLETION_WAITING_DOTS="true" - -# Disable marking untracked files under VCS as dirty. -DISABLE_UNTRACKED_FILES_DIRTY="true" - -# Oh My Zsh plugins. -plugins=( - autojump - zsh-autosuggestions - zsh-syntax-highlighting -) +# Bindkeys: +bindkey -v +bindkey "^?" backward-delete-char +bindkey "M-l" forward-char +bindkey "M-w" forward-word +bindkey '^R' history-incremental-search-backward +# Use vim keys in tab complete menu: +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 -source "${ZSH}/oh-my-zsh.sh" +# Plugins: +source /usr/share/zsh/plugins/zsh-autosuggestions/zsh-autosuggestions.zsh +source /usr/share/zsh/plugins/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh +source /usr/share/autojump/autojump.zsh +fpath=(/usr/share/zsh/site-functions/ $fpath) # ***************************************************************************** # Variables and Options: -# Starship prompt -#eval "$(starship init zsh)" - # Exported variables: binpath="${HOME}/.bin:${HOME}/.local/bin" export GOPATH="${HOME}/Documents/Code/.go" @@ -55,27 +62,14 @@ export VISUAL=${EDITOR} export XDG_CONFIG_HOME="${HOME}/.config" export FZF_DEFAULT_PREVIEW="bat --color=always --style=header,grid -r :300" +# Starship prompt +export STARSHIP_CONFIG="${XDG_CONFIG_HOME}/starship/starship.toml" +eval "$(starship init zsh)" + # OCaml opam configuration [[ ! -r /home/siddhartha/.opam/opam-init/init.zsh ]] \ || source /home/siddhartha/.opam/opam-init/init.zsh > /dev/null 2>&1 -# Zsh options: -export KEYTIMEOUT=1 -setopt EXTENDED_GLOB -setopt NO_AUTO_CD - -# Bindkeys: -bindkey -v -bindkey "^?" backward-delete-char -bindkey "M-l" forward-char -bindkey "M-w" forward-word -bindkey '^R' history-incremental-search-backward -# Use vim keys in tab complete menu: -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 - # ***************************************************************************** # Aliases: