Compare commits
10 commits
ed9ef50e66
...
9ff94af742
Author | SHA1 | Date | |
---|---|---|---|
9ff94af742 | |||
695bb39c84 | |||
9a5db52e52 | |||
76320a63fd | |||
db62f2496e | |||
7162103c05 | |||
5975732423 | |||
4a28e2acf4 | |||
3167fff12e | |||
2cdab434ac |
9 changed files with 106 additions and 91 deletions
|
@ -10,7 +10,7 @@
|
||||||
gpgsign = true
|
gpgsign = true
|
||||||
[core]
|
[core]
|
||||||
autocrlf = false
|
autocrlf = false
|
||||||
pager = less -FRX
|
pager = diff-so-fancy | less --tabs=2 -RF
|
||||||
[gpg]
|
[gpg]
|
||||||
format = ssh
|
format = ssh
|
||||||
[http]
|
[http]
|
||||||
|
@ -26,3 +26,9 @@
|
||||||
|
|
||||||
[include]
|
[include]
|
||||||
path = ~/.local/config/git
|
path = ~/.local/config/git
|
||||||
|
[interactive]
|
||||||
|
diffFilter = diff-so-fancy --patch
|
||||||
|
[diff-so-fancy]
|
||||||
|
markEmptyLines = true
|
||||||
|
changeHunkIndicators = true
|
||||||
|
rulerWidth = 40
|
||||||
|
|
|
@ -1,3 +1,5 @@
|
||||||
config:
|
config:
|
||||||
MD004: false
|
MD004: false
|
||||||
MD013: false
|
MD013: false
|
||||||
|
MD022: false
|
||||||
|
MD032: false
|
||||||
|
|
|
@ -12,7 +12,7 @@ vim.o.cursorline = true
|
||||||
vim.o.expandtab = true
|
vim.o.expandtab = true
|
||||||
vim.o.gdefault = true
|
vim.o.gdefault = true
|
||||||
vim.o.hlsearch = true
|
vim.o.hlsearch = true
|
||||||
vim.o.inccommand = "split"
|
vim.o.ignorecase = true
|
||||||
vim.o.number = true
|
vim.o.number = true
|
||||||
vim.o.relativenumber = false
|
vim.o.relativenumber = false
|
||||||
vim.o.shiftround = true
|
vim.o.shiftround = true
|
||||||
|
@ -31,6 +31,7 @@ vim.o.clipboard = ""
|
||||||
vim.o.conceallevel = 0
|
vim.o.conceallevel = 0
|
||||||
vim.o.fileencoding = "utf-8"
|
vim.o.fileencoding = "utf-8"
|
||||||
vim.o.foldcolumn = "0"
|
vim.o.foldcolumn = "0"
|
||||||
|
vim.o.inccommand = "split"
|
||||||
vim.o.mouse = ""
|
vim.o.mouse = ""
|
||||||
vim.o.shiftwidth = 2
|
vim.o.shiftwidth = 2
|
||||||
vim.o.signcolumn = "yes"
|
vim.o.signcolumn = "yes"
|
||||||
|
|
|
@ -30,7 +30,7 @@ require("lazy").setup({
|
||||||
},
|
},
|
||||||
checker = {
|
checker = {
|
||||||
enabled = true,
|
enabled = true,
|
||||||
notify = true,
|
notify = false,
|
||||||
},
|
},
|
||||||
change_detection = {
|
change_detection = {
|
||||||
enabled = true,
|
enabled = true,
|
||||||
|
|
|
@ -89,12 +89,12 @@ return {
|
||||||
terraform = { "terraform_fmt" },
|
terraform = { "terraform_fmt" },
|
||||||
tf = { "terraform_fmt" },
|
tf = { "terraform_fmt" },
|
||||||
zsh = { "shfmt" },
|
zsh = { "shfmt" },
|
||||||
yaml = { "yamlfix" },
|
-- yaml = { "yamlfix" },
|
||||||
},
|
|
||||||
format_on_save = {
|
|
||||||
lsp_fallback = true,
|
|
||||||
async = false,
|
|
||||||
},
|
},
|
||||||
|
-- format_on_save = {
|
||||||
|
-- lsp_fallback = true,
|
||||||
|
-- async = false,
|
||||||
|
-- },
|
||||||
})
|
})
|
||||||
end,
|
end,
|
||||||
},
|
},
|
||||||
|
|
|
@ -26,7 +26,7 @@ set -g status-style "bg=default"
|
||||||
set -g message-style "fg=default,bg=default"
|
set -g message-style "fg=default,bg=default"
|
||||||
set -g message-command-style "fg=default,bg=default"
|
set -g message-command-style "fg=default,bg=default"
|
||||||
set -g status-left ""
|
set -g status-left ""
|
||||||
set -g status-right "#{?client_prefix,#[reverse]#[fg=color2] prefix #[noreverse],}#[fg=color6] #h "
|
set -g status-right "#{?client_prefix,#[reverse]#[fg=color2] prefix #[noreverse],}#[fg=color6] #(whoami)@#h "
|
||||||
setw -g window-status-separator ""
|
setw -g window-status-separator ""
|
||||||
setw -g window-status-format "#[fg=color242,bg=default] #W "
|
setw -g window-status-format "#[fg=color242,bg=default] #W "
|
||||||
setw -g window-status-current-format "#[fg=color0,bg=color6] #W "
|
setw -g window-status-current-format "#[fg=color0,bg=color6] #W "
|
||||||
|
|
|
@ -1,84 +1,4 @@
|
||||||
# shellcheck disable=SC1091,SC1094,SC2206,SC2148
|
source "${ZDOTDIR}/common.zsh"
|
||||||
|
|
||||||
# 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
|
# local settings
|
||||||
if [[ -f "${HOME}/.local/config/zsh" ]]; then
|
if [[ -f "${HOME}/.local/config/zsh" ]]; then
|
||||||
|
|
86
config/common/zsh/common.zsh
Normal file
86
config/common/zsh/common.zsh
Normal file
|
@ -0,0 +1,86 @@
|
||||||
|
# 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"
|
|
@ -37,7 +37,7 @@ else
|
||||||
|
|
||||||
# zsh modules
|
# zsh modules
|
||||||
mkdir -p "${LOCAL_GIT_DIR}/zsh_modules"
|
mkdir -p "${LOCAL_GIT_DIR}/zsh_modules"
|
||||||
for module in mfaerevaag/wd romkatv/powerlevel10k zdharma-continuum/fast-syntax-highlighting; do
|
for module in mfaerevaag/wd romkatv/powerlevel10k so-fancy/diff-so-fancy zdharma-continuum/fast-syntax-highlighting; do
|
||||||
rm -rf "${LOCAL_GIT_DIR}/zsh_modules/${module#*/}"
|
rm -rf "${LOCAL_GIT_DIR}/zsh_modules/${module#*/}"
|
||||||
git clone https://github.com/${module} "${LOCAL_GIT_DIR}/zsh_modules/${module#*/}"
|
git clone https://github.com/${module} "${LOCAL_GIT_DIR}/zsh_modules/${module#*/}"
|
||||||
done
|
done
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue