Fix minor things

This commit is contained in:
Alexander Navarro 2024-02-26 11:52:51 -03:00
parent a393229c2e
commit f6010d35db
2 changed files with 56 additions and 55 deletions

View file

@ -7,13 +7,14 @@ return {
edit_with_instructions = { edit_with_instructions = {
diff = false, diff = false,
keymaps = { keymaps = {
close = "<C-c>", -- close = "<C-c>",
accept = "<C-y>", -- accept = "<C-y>",
toggle_diff = "<C-d>", -- toggle_diff = "<C-d>",
toggle_settings = "<C-o>", -- toggle_settings = "<C-o>",
toggle_help = "<C-h>", -- toggle_help = "<C-h>",
cycle_windows = "<Tab>", -- cycle_windows = "<Tab>",
use_output_as_input = "<C-i>", -- use_output_as_input = "<C-i>",
submit = "<C-a>",
}, },
}, },
chat = { chat = {
@ -39,28 +40,29 @@ return {
}, },
}, },
keymaps = { keymaps = {
close = "<C-c>", -- close = "<C-c>",
yank_last = "<C-y>", -- yank_last = "<C-y>",
yank_last_code = "<C-k>", -- yank_last_code = "<C-k>",
scroll_up = "<C-u>", -- scroll_up = "<C-u>",
scroll_down = "<C-d>", -- scroll_down = "<C-d>",
new_session = "<C-n>", -- new_session = "<C-n>",
cycle_windows = "<Tab>", -- cycle_windows = "<Tab>",
cycle_modes = "<C-f>", -- cycle_modes = "<C-f>",
next_message = "<C-j>", -- next_message = "<C-j>",
prev_message = "<C-k>", -- prev_message = "<C-k>",
select_session = "<Space>", -- select_session = "<Space>",
rename_session = "r", -- rename_session = "r",
delete_session = "d", -- delete_session = "d",
draft_message = "<C-r>", -- draft_message = "<C-r>",
edit_message = "e", -- edit_message = "e",
delete_message = "d", -- delete_message = "d",
toggle_settings = "<C-o>", -- toggle_settings = "<C-o>",
toggle_sessions = "<C-p>", -- toggle_sessions = "<C-p>",
toggle_help = "<C-h>", -- toggle_help = "<C-h>",
toggle_message_role = "<C-r>", -- toggle_message_role = "<C-r>",
toggle_system_role_open = "<C-s>", -- toggle_system_role_open = "<C-s>",
stop_generating = "<C-x>", -- stop_generating = "<C-x>",
submit = "<C-a>",
}, },
}, },
popup_layout = { popup_layout = {

View file

@ -1,31 +1,31 @@
#/usr/share/fzf/shell/key-bindings.zsh/usr/share/fzf/shell/key-bindings.zsh Start mesuring bottlenecks # Start measuring bottlenecks
if [[ "$ZPROF" = true ]]; then if [[ "$ZPROF" = true ]]; then
zmodload zsh/zprof zmodload zsh/zprof
fi fi
#--------------------------------------------------------------------# #--------------------------------------------------------------------#
# ZSH Config # # ZSH Config #
#--------------------------------------------------------------------# #--------------------------------------------------------------------#
# set VIM keybindings # Set VIM keybindings
bindkey -v bindkey -v
export KEYTIMEOUT=1 export KEYTIMEOUT=1
autoload -Uz edit-command-line autoload -Uz edit-command-line
zle -N edit-command-line zle -N edit-command-line
bindkey -M vicmd V edit-command-line # edits files in vim, hit Shift+v in normal mode bindkey -M vicmd V edit-command-line # Edits files in vim, hit Shift+v in normal mode
# Add vim text objects # Add vim text objects
autoload -Uz select-bracketed select-quoted autoload -Uz select-bracketed select-quoted
zle -N select-quoted zle -N select-quoted
zle -N select-bracketed zle -N select-bracketed
for km in viopp visual; do for km in viopp visual; do
bindkey -M $km -- '-' vi-up-line-or-history bindkey -M $km -- '-' vi-up-line-or-history
for c in {a,i}${(s..)^:-\'\"\`\|,./:;=+@}; do for c in {a,i}${(s..)^:-\'\"\`\|,./:;=+@}; do
bindkey -M $km $c select-quoted bindkey -M $km $c select-quoted
done done
for c in {a,i}${(s..)^:-'()[]{}<>bB'}; do for c in {a,i}${(s..)^:-'()[]{}<>bB'}; do
bindkey -M $km $c select-bracketed bindkey -M $km $c select-bracketed
done done
done done
# History # History
@ -41,7 +41,6 @@ setopt CDABLE_VARS
setopt PUSHD_SILENT setopt PUSHD_SILENT
# Completion # Completion
setopt AUTO_LIST # Automatically list choices on ambiguous completion. setopt AUTO_LIST # Automatically list choices on ambiguous completion.
# setopt CORRECT # Turn on spelling correction for command. # setopt CORRECT # Turn on spelling correction for command.
setopt COMPLETE_IN_WORD # Complete from both ends of a word. setopt COMPLETE_IN_WORD # Complete from both ends of a word.
@ -56,7 +55,7 @@ zstyle ':completion:*:warnings' format '%F{cyan}%BSorry, no matches for: %d%b%f'
zstyle ':completion:*' rehash true zstyle ':completion:*' rehash true
zstyle ':completion:*' use-cache on zstyle ':completion:*' use-cache on
# autocomplete: https://github.com/marlonrichert/zsh-autocomplete/blob/main/.zshrc # Autocomplete: https://github.com/marlonrichert/zsh-autocomplete/blob/main/.zshrc
zstyle ':autocomplete:*' fzf-completion yes zstyle ':autocomplete:*' fzf-completion yes
zstyle ':autocomplete:*' min-input 1 zstyle ':autocomplete:*' min-input 1
zstyle ':autocomplete:*' widget-style menu-select # Tab select instead of autocomplete zstyle ':autocomplete:*' widget-style menu-select # Tab select instead of autocomplete
@ -87,25 +86,25 @@ setopt GLOB_DOTS
# Start Stuff # # Start Stuff #
#--------------------------------------------------------------------# #--------------------------------------------------------------------#
# File directory that are needed to source # File directories that are needed to source
files=( files=(
# zsh # zsh
$DOTS/config/zsh/**/*.zsh $DOTS/config/zsh/**/*.zsh
# fzf scripts that need to be sourced # fzf scripts that need to be sourced
$DOTS/scripts/fzf-flatpak $DOTS/scripts/fzf-flatpak
# fzf config file # fzf config file
$DOOTS/config/fzf/fzfrc $DOOTS/config/fzf/fzfrc
) )
for file in $files; do for file in $files; do
if [[ -f $file ]]; then if [[ -f $file ]]; then
emulate -L zsh emulate -L zsh
source $file source $file
fi fi
done done
if [[ "$ZPROF" = true ]]; then if [[ "$ZPROF" = true ]]; then
zprof zprof
fi fi
eval "$(starship init zsh)" eval "$(starship init zsh)"
@ -113,6 +112,6 @@ eval "$(starship init zsh)"
eval "$(zoxide init zsh)" eval "$(zoxide init zsh)"
eval "$(mise activate zsh)" eval "$(mise activate zsh)"
# Load syntax highlight at the end so other configuration can use it # Load syntax highlight at the end so other configurations can use it
# Color scheme for syntax highlighting # Color scheme for syntax highlighting
source ~/.config/zsh/themes/catppuccin_macchiato-zsh-syntax-highlighting.zsh source ~/.config/zsh/themes/catppuccin_macchiato-zsh-syntax-highlighting.zsh