diff --git a/config/common/git/config b/config/common/git/config index 9b25071..3413630 100644 --- a/config/common/git/config +++ b/config/common/git/config @@ -10,7 +10,7 @@ gpgsign = true [core] autocrlf = false - pager = diff-so-fancy | less --tabs=2 -RF + pager = less -FRX [gpg] format = ssh [http] @@ -26,9 +26,3 @@ [include] path = ~/.local/config/git -[interactive] - diffFilter = diff-so-fancy --patch -[diff-so-fancy] - markEmptyLines = true - changeHunkIndicators = true - rulerWidth = 40 diff --git a/config/common/nvim/lua/config/global.markdownlint-cli2.yaml b/config/common/nvim/lua/config/global.markdownlint-cli2.yaml index 60cd049..ca8c544 100644 --- a/config/common/nvim/lua/config/global.markdownlint-cli2.yaml +++ b/config/common/nvim/lua/config/global.markdownlint-cli2.yaml @@ -1,5 +1,3 @@ config: MD004: false MD013: false - MD022: false - MD032: false diff --git a/config/common/nvim/lua/config/settings.lua b/config/common/nvim/lua/config/settings.lua index 5b28751..805d8b6 100644 --- a/config/common/nvim/lua/config/settings.lua +++ b/config/common/nvim/lua/config/settings.lua @@ -12,7 +12,7 @@ vim.o.cursorline = true vim.o.expandtab = true vim.o.gdefault = true vim.o.hlsearch = true -vim.o.ignorecase = true +vim.o.inccommand = "split" vim.o.number = true vim.o.relativenumber = false vim.o.shiftround = true @@ -31,7 +31,6 @@ vim.o.clipboard = "" vim.o.conceallevel = 0 vim.o.fileencoding = "utf-8" vim.o.foldcolumn = "0" -vim.o.inccommand = "split" vim.o.mouse = "" vim.o.shiftwidth = 2 vim.o.signcolumn = "yes" diff --git a/config/common/nvim/lua/core/lazy.lua b/config/common/nvim/lua/core/lazy.lua index 73d85ae..c2b5aab 100644 --- a/config/common/nvim/lua/core/lazy.lua +++ b/config/common/nvim/lua/core/lazy.lua @@ -30,7 +30,7 @@ require("lazy").setup({ }, checker = { enabled = true, - notify = false, + notify = true, }, change_detection = { enabled = true, diff --git a/config/common/nvim/lua/plugins/extra/linters.lua b/config/common/nvim/lua/plugins/extra/linters.lua index c8ae8ed..2b72e89 100644 --- a/config/common/nvim/lua/plugins/extra/linters.lua +++ b/config/common/nvim/lua/plugins/extra/linters.lua @@ -89,12 +89,12 @@ return { terraform = { "terraform_fmt" }, tf = { "terraform_fmt" }, zsh = { "shfmt" }, - -- yaml = { "yamlfix" }, + yaml = { "yamlfix" }, + }, + format_on_save = { + lsp_fallback = true, + async = false, }, - -- format_on_save = { - -- lsp_fallback = true, - -- async = false, - -- }, }) end, }, diff --git a/config/common/tmux/tmux.conf b/config/common/tmux/tmux.conf index f034790..b532da6 100644 --- a/config/common/tmux/tmux.conf +++ b/config/common/tmux/tmux.conf @@ -26,7 +26,7 @@ set -g status-style "bg=default" set -g message-style "fg=default,bg=default" set -g message-command-style "fg=default,bg=default" set -g status-left "" -set -g status-right "#{?client_prefix,#[reverse]#[fg=color2] prefix #[noreverse],}#[fg=color6] #(whoami)@#h " +set -g status-right "#{?client_prefix,#[reverse]#[fg=color2] prefix #[noreverse],}#[fg=color6] #h " setw -g window-status-separator "" setw -g window-status-format "#[fg=color242,bg=default] #W " setw -g window-status-current-format "#[fg=color0,bg=color6] #W " diff --git a/config/common/zsh/.zshrc b/config/common/zsh/.zshrc index a375c35..e25dede 100644 --- a/config/common/zsh/.zshrc +++ b/config/common/zsh/.zshrc @@ -1,4 +1,84 @@ -source "${ZDOTDIR}/common.zsh" +# shellcheck disable=SC1091,SC1094,SC2206,SC2148 + +# quick note functionality +if [[ -f "${HOME}/.note" ]]; then + echo + cat "${HOME}/.note" + echo +fi + +tabs 2 + +# instant prompt should stay on the top +if [[ -r "${XDG_CACHE_HOME}/p10k-instant-prompt-${(%):-%n}.zsh" ]]; then + source "${XDG_CACHE_HOME}/p10k-instant-prompt-${(%):-%n}.zsh" +fi + +# macOS specific +if [[ $(uname -s) = "Darwin" ]]; then + eval "$(/opt/homebrew/bin/brew shellenv)" +fi + +# prepare directories +mkdir -p "${XDG_CACHE_HOME}/zsh" +mkdir -p "${XDG_DATA_HOME}/zsh" + +# history settings +export HISTFILE="${XDG_DATA_HOME}/zsh/history" +export HISTSIZE=10000 +export SAVEHIST=$HISTSIZE +setopt EXTENDED_HISTORY +setopt HIST_EXPIRE_DUPS_FIRST +setopt HIST_FIND_NO_DUPS +setopt HIST_IGNORE_ALL_DUPS +setopt HIST_IGNORE_DUPS +setopt HIST_IGNORE_SPACE +setopt HIST_REDUCE_BLANKS +setopt HIST_SAVE_NO_DUPS +setopt INC_APPEND_HISTORY +setopt SHARE_HISTORY +setopt RMSTARSILENT +rm -rf "${ZDOTDIR}/.zsh_history" && ln -sf "${XDG_DATA_HOME}/zsh/history" "${ZDOTDIR}/.zsh_history" + +# set path +path=(~/.local/bin "${path[@]}") + +# source configuration +source "${ZDOTDIR}/aliases.zsh" +source "${ZDOTDIR}/keys.zsh" +source "${ZDOTDIR}/fzf.zsh" + +# set fpath +fpath=(~/.local/git/zsh_modules/wd $fpath) + +# theme and colors +if [[ $(command -v vivid) ]]; then + LS_COLORS=$(vivid generate molokai) + export LS_COLORS +else + unset LS_COLORS +fi +source ~/.local/git/zsh_modules/powerlevel10k/powerlevel10k.zsh-theme +source "${ZDOTDIR}/p10k.zsh" + +# completion +autoload -Uz compinit +if [ ! -e "${XDG_DATA_HOME}/zsh/zcompdump.zwc" ]; then + autoload -Uz zrecompile + zrecompile -p -R "${XDG_DATA_HOME}/zsh/zcompdump" +fi +compinit -C -d "${XDG_DATA_HOME}/zsh/zcompdump" + +zstyle ':completion:*' menu select +zstyle ':completion:*' list-colors ${(s.:.)LS_COLORS} + +# source modules +source "${HOME}/.local/git/zsh_modules/fast-syntax-highlighting/fast-syntax-highlighting.plugin.zsh" +source "${HOME}/.local/git/zsh_modules/wd/wd.plugin.zsh" +export WD_CONFIG="${XDG_CONFIG_HOME}/wd_list" + +# cleaning +rm -rf "${HOME}/.warprc" # local settings if [[ -f "${HOME}/.local/config/zsh" ]]; then diff --git a/config/common/zsh/common.zsh b/config/common/zsh/common.zsh deleted file mode 100644 index 253a78f..0000000 --- a/config/common/zsh/common.zsh +++ /dev/null @@ -1,86 +0,0 @@ -# shellcheck disable=SC1091,SC1094,SC2206,SC2148 - -if [ $(uname -s) = "Darwin" ]; then - realhome=$(dscl . -read /Users/${USER} | grep Home | cut -d' ' -f2) -else - realhome=$(getent passwd ${USER} | cut -d: -f6) -fi - -# quick note functionality -if [[ -f "${realhome}/.note" ]]; then - echo - cat "${realhome}/.note" - echo -fi - -# instant prompt should stay on the top -if [[ -r "${XDG_CACHE_HOME}/p10k-instant-prompt-${(%):-%n}.zsh" ]]; then - source "${XDG_CACHE_HOME}/p10k-instant-prompt-${(%):-%n}.zsh" -fi - -# macOS specific -if [[ $(uname -s) = "Darwin" ]]; then - eval "$(/opt/homebrew/bin/brew shellenv)" -fi - -# prepare directories -mkdir -p "${XDG_CACHE_HOME}/zsh" -mkdir -p "${XDG_DATA_HOME}/zsh" - -# history settings -export HISTFILE="${XDG_DATA_HOME}/zsh/history" -export HISTSIZE=10000 -export SAVEHIST=$HISTSIZE -setopt extended_history -setopt hist_expire_dups_first -setopt hist_find_no_dups -setopt hist_ignore_all_dups -setopt hist_ignore_dups -setopt hist_ignore_space -setopt hist_reduce_blanks -setopt hist_save_no_dups -setopt inc_append_history -setopt share_history -setopt rmstarsilent -#rm -rf "${ZDOTDIR}/.zsh_history" && ln -sf "${XDG_DATA_HOME}/zsh/history" "${ZDOTDIR}/.zsh_history" - -# set path -path=(~/.local/bin "${path[@]}") - -# source configuration -source "${ZDOTDIR}/aliases.zsh" -source "${ZDOTDIR}/keys.zsh" -source "${ZDOTDIR}/fzf.zsh" - -# set fpath -fpath=(~/.local/git/zsh_modules/wd $fpath) - -# theme and colors -if [[ $(command -v vivid) ]]; then - LS_COLORS=$(vivid generate molokai) - export LS_COLORS -else - unset LS_COLORS -fi -source "${realhome}/.local/git/zsh_modules/powerlevel10k/powerlevel10k.zsh-theme" -source "${ZDOTDIR}/p10k.zsh" - -# completion -autoload -Uz compinit -if [ ! -e "${XDG_DATA_HOME}/zsh/zcompdump.zwc" ]; then - autoload -Uz zrecompile - zrecompile -p -R "${XDG_DATA_HOME}/zsh/zcompdump" -fi -compinit -C -d "${XDG_DATA_HOME}/zsh/zcompdump" - -zstyle ':completion:*' menu select -zstyle ':completion:*' list-colors ${(s.:.)LS_COLORS} - -# source modules -source "${realhome}/.local/git/zsh_modules/fast-syntax-highlighting/fast-syntax-highlighting.plugin.zsh" -source "${realhome}/.local/git/zsh_modules/wd/wd.plugin.zsh" -source "${realhome}/.local/git/zsh_modules/diff-so-fancy/diff-so-fancy.plugin.zsh" -export WD_CONFIG="${XDG_CONFIG_HOME}/wd_list" - -# cleaning -rm -rf "${realhome}/.warprc" diff --git a/install.sh b/install.sh index e4f365f..aec738d 100644 --- a/install.sh +++ b/install.sh @@ -37,7 +37,7 @@ else # zsh modules mkdir -p "${LOCAL_GIT_DIR}/zsh_modules" - for module in mfaerevaag/wd romkatv/powerlevel10k so-fancy/diff-so-fancy zdharma-continuum/fast-syntax-highlighting; do + for module in mfaerevaag/wd romkatv/powerlevel10k zdharma-continuum/fast-syntax-highlighting; do rm -rf "${LOCAL_GIT_DIR}/zsh_modules/${module#*/}" git clone https://github.com/${module} "${LOCAL_GIT_DIR}/zsh_modules/${module#*/}" done