From adc8306a12a2db9096908db785dbb7f0c19ccb27 Mon Sep 17 00:00:00 2001 From: servostar Date: Mon, 6 Jan 2025 21:10:58 +0100 Subject: [PATCH] chore: add zshrc --- .zshrc | 47 +++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 47 insertions(+) create mode 100644 .zshrc diff --git a/.zshrc b/.zshrc new file mode 100644 index 0000000..e2639a9 --- /dev/null +++ b/.zshrc @@ -0,0 +1,47 @@ +# Lines configured by zsh-newuser-install +setopt autocd beep extendedglob +bindkey -e +# End of lines configured by zsh-newuser-install +# The following lines were added by compinstall + +# Share command history across sessions. +HISTFILE=~/.zsh_history +HISTSIZE=10000 +SAVEHIST=10000 +setopt share_history + +# Zinit +ZINIT_HOME="${XDG_DATA_HOME:-${HOME}/.local/share}/zinit/zinit.git" +[ ! -d $ZINIT_HOME ] && mkdir -p "$(dirname $ZINIT_HOME)" +[ ! -d $ZINIT_HOME/.git ] && git clone https://github.com/zdharma-continuum/zinit.git "$ZINIT_HOME" +source "${ZINIT_HOME}/zinit.zsh" + +zstyle :compinstall filename '/home/srvstr/.zshrc' + +# Map CTRL + left keys +# Source: https://unix.stackexchange.com/a/332049 +bindkey "^[[1;5D" backward-word +bindkey "^[[1;5C" forward-word + +autoload -Uz compinit +compinit +# End of lines added by compinstall + +# Always source `.env` files +ZSH_DOTENV_PROMPT=false + +eval "$(starship init zsh)" + +# Zinit plugins +zinit light zsh-users/zsh-syntax-highlighting +zinit light zsh-users/zsh-autosuggestions +zinit light zsh-users/zsh-completions +zinit snippet OMZP::dotenv +zinit snippet OMZP::command-not-found +zinit snippet OMZP::eza +zinit snippet OMZP::colored-man-pages + +# Configure eza instead of ls +zstyle ':omz:plugins:eza' 'dirs-first' yes +zstyle ':omz:plugins:eza' 'icons' yes +