From 4d7bd1a48760c320a92875b2206fb23ba5853712 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C5=81ukasz=20Pankowski?= Date: Thu, 20 Jun 2024 00:20:31 +0200 Subject: [PATCH] nvim/zsh/tmux: better-escape, starship prompt and plugins, tmux rounded corners - zsh: add plugins: zsh-history-substring-search, zsh-z --- nvim/.config/nvim/lazy-lock.json | 1 + nvim/.config/nvim/lua/plugins/convenience.lua | 6 ++++ shell/.zshrc | 35 +++++++++++++------ tmux/.tmux.conf | 8 ++--- 4 files changed, 35 insertions(+), 15 deletions(-) diff --git a/nvim/.config/nvim/lazy-lock.json b/nvim/.config/nvim/lazy-lock.json index 434be21..6779ac1 100644 --- a/nvim/.config/nvim/lazy-lock.json +++ b/nvim/.config/nvim/lazy-lock.json @@ -2,6 +2,7 @@ "Comment.nvim": { "branch": "master", "commit": "e30b7f2008e52442154b66f7c519bfd2f1e32acb" }, "LuaSnip": { "branch": "master", "commit": "50fcf17db7c75af80e6b6109acfbfb4504768780" }, "arrow.nvim": { "branch": "master", "commit": "0b0191d967d9fd837a850f2ccaa95d5917239404" }, + "better-escape.nvim": { "branch": "master", "commit": "7e86edafb8c7e73699e0320f225464a298b96d12" }, "blame.nvim": { "branch": "main", "commit": "dedbcdce857f708c63f261287ac7491a893912d0" }, "bookmarks.nvim": { "branch": "main", "commit": "42371a76cdd786452b537490926b1b6a041672e5" }, "ccc.nvim": { "branch": "main", "commit": "22924b7bde685e1816140f17a897950ef82b969a" }, diff --git a/nvim/.config/nvim/lua/plugins/convenience.lua b/nvim/.config/nvim/lua/plugins/convenience.lua index e8c8f52..8e64d60 100644 --- a/nvim/.config/nvim/lua/plugins/convenience.lua +++ b/nvim/.config/nvim/lua/plugins/convenience.lua @@ -16,4 +16,10 @@ return { } end, }, + { + "max397574/better-escape.nvim", + config = function() + require("better_escape").setup() + end, + }, } diff --git a/shell/.zshrc b/shell/.zshrc index 651fa6b..71df1de 100644 --- a/shell/.zshrc +++ b/shell/.zshrc @@ -16,21 +16,36 @@ plug "zap-zsh/fzf" plug "zsh-users/zsh-autosuggestions" plug "zsh-users/zsh-syntax-highlighting" plug "MichaelAquilina/zsh-you-should-use" +plug "zsh-users/zsh-history-substring-search" +plug "agkozak/zsh-z" +ZVM_VI_INSERT_ESCAPE_BINDKEY=jj ZSH_HIGHLIGHT_STYLES[comment]=fg=blue +HISTORY_SUBSTRING_SEARCH_HIGHLIGHT_FOUND=bg=magenta,fg=black,bold +HISTORY_SUBSTRING_SEARCH_HIGHLIGHT_NOT_FOUND=bg=red,fg=black,bold +ZSHZ_ECHO=1 + +bindkey '^[[A' history-substring-search-up +bindkey '^[[B' history-substring-search-down +bindkey -M vicmd 'k' history-substring-search-up +bindkey -M vicmd 'j' history-substring-search-down # Prompt. -autoload -Uz vcs_info -precmd () { vcs_info } -setopt prompt_subst -zstyle ':vcs_info:git:*' check-for-changes true -zstyle ':vcs_info:git:*' formats '%F{green}%r%f/%F{yellow}%S%f %F{magenta}(%b)%u%c%f ' -zstyle ':vcs_info:git:*' actionformats '%F{green}%r%f/%F{yellow}%S%f %F{magenta}(%b|%a)%u%c%f ' -zstyle ':vcs_info:*' nvcsformats '%F{green}%~%f%b ' -zstyle ':vcs_info:*' enable git -PS1='%B%F{blue}%n@%m%f ${vcs_info_msg_0_}%B%#%f%b ' -RPROMPT='%(?..%B%F{red}%?%f%b)' +if which starship > /dev/null; then + eval "$(starship init zsh)" +else + autoload -Uz vcs_info + precmd () { vcs_info } + setopt prompt_subst + zstyle ':vcs_info:git:*' check-for-changes true + zstyle ':vcs_info:git:*' formats '%F{green}%r%f/%F{yellow}%S%f %F{magenta}(%b)%u%c%f ' + zstyle ':vcs_info:git:*' actionformats '%F{green}%r%f/%F{yellow}%S%f %F{magenta}(%b|%a)%u%c%f ' + zstyle ':vcs_info:*' nvcsformats '%F{green}%~%f%b ' + zstyle ':vcs_info:*' enable git + PS1='%B%F{blue}%n@%m%f ${vcs_info_msg_0_}%B%#%f%b ' + RPROMPT='%(?..%B%F{red}%?%f%b)' +fi # History. diff --git a/tmux/.tmux.conf b/tmux/.tmux.conf index e4b1c0d..a870ffe 100644 --- a/tmux/.tmux.conf +++ b/tmux/.tmux.conf @@ -27,9 +27,7 @@ set -g set-titles on set -g set-titles-string "#H [#S]" set -g status-justify centre -set -g status-left "#[bg=green]#[fg=black] #H #[bg=default]#[fg=default] #S" +set -g status-left " #[fg=green]#[bg=green]#[fg=black] #H #[bg=default]#[fg=green]#[fg=default] #S" set -g status-left-length 50 -set -g status-right "#[bg=green]#[fg=black] %H:%M " - -set-window-option -g window-status-current-style bg=green -set-window-option -ga window-status-current-style fg=black +set -g status-right "#[fg=green]#[bg=green]#[fg=black] %H:%M #[bg=default]#[fg=green] " +set-window-option -g window-status-current-format '#[fg=green]#[bg=green]#[fg=black] #I:#W #[fg=green]#[bg=black]'