summaryrefslogtreecommitdiff
path: root/config/essentials
diff options
context:
space:
mode:
authorRaymaekers Luca <raymaekers.luca@gmail.com>2023-11-08 21:00:04 +0100
committerRaymaekers Luca <raymaekers.luca@gmail.com>2023-11-08 21:00:04 +0100
commitf769f41e1293fac166e1b816bdf724fde3ef6527 (patch)
tree1c86adabc7bb122e4ba671fa78833387e5fe97a0 /config/essentials
parent5cc8b035e86a8f977ea8ace79f6c5771d238b0df (diff)
parent02cd777039f3cd9715a97c9a186a4175a1604203 (diff)
Merge branch 'main' of db:dotfiles
Diffstat (limited to 'config/essentials')
-rw-r--r--config/essentials/nvim/lua/user/packer.lua2
-rw-r--r--config/essentials/zsh/.zshrc52
2 files changed, 51 insertions, 3 deletions
diff --git a/config/essentials/nvim/lua/user/packer.lua b/config/essentials/nvim/lua/user/packer.lua
index 8091d85..edb763d 100644
--- a/config/essentials/nvim/lua/user/packer.lua
+++ b/config/essentials/nvim/lua/user/packer.lua
@@ -42,7 +42,7 @@ return require('packer').startup(function(use)
use('ojroques/vim-oscyank', { branch = "main" })
use("potamides/pantran.nvim")
use('alx741/vinfo')
- use('sheerun/vim-polyglot')
+ -- use('sheerun/vim-polyglot') TODO: fix error conflicting with telekasten
-- use('github/copilot.vim')
--
use {
diff --git a/config/essentials/zsh/.zshrc b/config/essentials/zsh/.zshrc
index 76ff87f..45f98e4 100644
--- a/config/essentials/zsh/.zshrc
+++ b/config/essentials/zsh/.zshrc
@@ -15,13 +15,61 @@ autoload -U select-word-style
autoload -z edit-command-line
zle -N edit-command-line
zstyle ':compinstall' filename '/home/aluc/.zshrc'
+
+### Completion
+# cache
+zstyle ':completion:*' use-cache on
+zstyle ':completion:*' cache-path "$ZDOTDIR/zcompcache"
+
+# completers
+zstyle ':completion:*' completer _extensions _complete _approximate
+
+# format
+zstyle ':completion:*:*:*:*:corrections' format '%F{yellow}!- (%e) -!%f'
+zstyle ':completion:*:*:*:*:descriptions' format '%F{blue}-- %D%d --%f'
+zstyle ':completion:*:*:*:*:messages' format '%F{purple}-- %d --%f'
+zstyle ':completion:*:*:*:*:warnings' format '%F{red}-- no matches found --%f'
+zstyle ':completion:*:default' list-prompt '%S%M matches%s'
+# show a 'ls -a' like outptut when listing files
+zstyle ':completion:*' file-list all
+zstyle ':completion:*:*:*:*:default' list-colors ${(s.:.)LS_COLORS}
+
+# Group completions by categories
+zstyle ':completion:*' group-name ''
+zstyle ':completion:*:*:-command-:*:*' group-order aliases builtins functions commands
+
+zstyle ':completion:*' squeeze-slashes true
+
+# Prefer completing for an option (think cd -)
+zstyle ':completion:*' complete-options true
+
+# See ZSHCOMPWID "completion matching control"
+zstyle ':completion:*' matcher-list '' 'm:{a-zA-Z}={A-Za-z}' 'r:|[._-]=* r:|=*' 'l:|=* r:|=*'
+
+# keep prefix when completing
+zstyle ':completion:*' keep-prefix true
+
+# ui
zstyle ':completion:*' menu select
-autoload -Uz compinit
+# Move around using h j k l in completion menu
+zmodload zsh/complist
+bindkey -M menuselect 'h' vi-backward-char
+bindkey -M menuselect 'k' vi-up-line-or-history
+bindkey -M menuselect 'j' vi-down-line-or-history
+bindkey -M menuselect 'l' vi-forward-char
+bindkey -M menuselect '^xg' clear-screen
+# interactive mode
+bindkey -M menuselect '^xi' vi-insert
+bindkey -M menuselect '^xh' accept-and-hold # Hold
+bindkey -M menuselect '^xn' accept-and-infer-next-history # Next
+bindkey -M menuselect '^xu' undo # Undo
+
+autoload -Uz compinit; compinit
+
autoload -Uz surround
zle -N delete-surround surround
zle -N add-surround surround
zle -N change-surround surround
-compinit
# Source files
. $ZDOTDIR/functions.zsh