Skip to content

Commit

Permalink
feat: remove oh-my-zsh. Use startship prompt
Browse files Browse the repository at this point in the history
  • Loading branch information
Sqvid committed Jun 17, 2024
1 parent a087ca1 commit c764dc7
Showing 1 changed file with 40 additions and 46 deletions.
86 changes: 40 additions & 46 deletions zsh/.zshrc
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand All @@ -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:
Expand Down

0 comments on commit c764dc7

Please sign in to comment.