mirror of
https://github.com/bgrolleman/dotfiles.git
synced 2025-12-06 05:45:24 +01:00
Update aerospace
This commit is contained in:
@@ -16,7 +16,7 @@ enable-normalization-opposite-orientation-for-nested-containers = true
|
||||
# See: https://nikitabobko.github.io/AeroSpace/guide#layouts
|
||||
# The 'accordion-padding' specifies the size of accordion padding
|
||||
# You can set 0 to disable the padding feature
|
||||
accordion-padding = 300
|
||||
accordion-padding = 90
|
||||
|
||||
# Possible values: tiles|accordion
|
||||
default-root-container-layout = 'tiles'
|
||||
|
||||
@@ -9,4 +9,18 @@ local wk = require("which-key")
|
||||
wk.add({
|
||||
{ "<leader>N", group = "Notes" },
|
||||
{ "<leader>Nt", ":Journal<CR>", desc = "Today" },
|
||||
{ "<leader>C", group = "ChatGPT" },
|
||||
{ "<leader>CC", ":ChatGPT<CR>", desc = "ChatGPT" },
|
||||
{ "<leader>Ce", "<cmd>ChatGPTEditWithInstruction<CR>", desc = "Edit with instruction", mode = { "n", "v" } },
|
||||
{ "<leader>Cg", "<cmd>ChatGPTRun grammar_correction<CR>", desc = "Grammar Correction", mode = { "n", "v" } },
|
||||
-- t = { "<cmd>ChatGPTRun translate<CR>", "Translate", mode = { "n", "v" } },
|
||||
-- k = { "<cmd>ChatGPTRun keywords<CR>", "Keywords", mode = { "n", "v" } },
|
||||
-- d = { "<cmd>ChatGPTRun docstring<CR>", "Docstring", mode = { "n", "v" } },
|
||||
-- a = { "<cmd>ChatGPTRun add_tests<CR>", "Add Tests", mode = { "n", "v" } },
|
||||
{ "<leader>Co", "<cmd>ChatGPTRun optimize_code<CR>", desc = "Optimize Code", mode = { "n", "v" } },
|
||||
-- s = { "<cmd>ChatGPTRun summarize<CR>", "Summarize", mode = { "n", "v" } },
|
||||
{ "<leader>Cf", "<cmd>ChatGPTRun fix_bugs<CR>", desc = "Fix Bugs", mode = { "n", "v" } },
|
||||
-- x = { "<cmd>ChatGPTRun explain_code<CR>", "Explain Code", mode = { "n", "v" } },
|
||||
-- r = { "<cmd>ChatGPTRun roxygen_edit<CR>", "Roxygen Edit", mode = { "n", "v" } },
|
||||
-- l = { "<cmd>ChatGPTRun code_readability_analysis<CR>", "Code Readability Analysis", mode = { "n", "v" } },
|
||||
})
|
||||
|
||||
@@ -38,7 +38,7 @@ require("lazy").setup({
|
||||
version = false, -- always use the latest git commit
|
||||
-- version = "*", -- try installing the latest stable version for plugins that support semver
|
||||
},
|
||||
install = { colorscheme = { "tokyonight", "habamax" } },
|
||||
install = { colorscheme = { "catppuccin" } },
|
||||
checker = {
|
||||
enabled = true, -- check for plugin updates periodically
|
||||
notify = false, -- notify on update
|
||||
|
||||
@@ -1,17 +0,0 @@
|
||||
return {
|
||||
"jackMort/ChatGPT.nvim",
|
||||
event = "VeryLazy",
|
||||
config = function()
|
||||
require("chatgpt").setup({
|
||||
openai_params = {
|
||||
model = "gpt-4.1"
|
||||
}
|
||||
})
|
||||
end,
|
||||
dependencies = {
|
||||
"MunifTanjim/nui.nvim",
|
||||
"nvim-lua/plenary.nvim",
|
||||
"folke/trouble.nvim", -- optional
|
||||
"nvim-telescope/telescope.nvim"
|
||||
}
|
||||
}
|
||||
@@ -1,6 +1,9 @@
|
||||
return {
|
||||
{
|
||||
"saghen/blink.cmp",
|
||||
dependencies = {
|
||||
"Kaiser-Yang/blink-cmp-avante",
|
||||
},
|
||||
opts = {
|
||||
completion = {
|
||||
ghost_text = {
|
||||
@@ -16,6 +19,20 @@ return {
|
||||
auto_show = true,
|
||||
},
|
||||
},
|
||||
sources = {
|
||||
-- Add 'avante' to the list
|
||||
-- NOTE Disbable adding this until I can properly figure it out
|
||||
-- default = { "avante", "lsp", "path", "buffer" },
|
||||
providers = {
|
||||
avante = {
|
||||
module = "blink-cmp-avante",
|
||||
name = "Avante",
|
||||
opts = {
|
||||
-- options for blink-cmp-avante
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
# Load catppuccin
|
||||
run ~/.config/tmux/plugins/catppuccin/tmux/catppuccin.tmux
|
||||
|
||||
|
||||
# Options to make tmux more pleasant
|
||||
#set -g mouse on
|
||||
set -g default-terminal "tmux-256color"
|
||||
@@ -10,9 +10,9 @@ set -g renumber-windows on
|
||||
# Configure the catppuccin plugin
|
||||
set -g @catppuccin_flavor "mocha"
|
||||
set -g @catppuccin_window_status_style "slanted"
|
||||
set -g @catppuccin_window_current_text " #{window_name} #{b:pane_current_path}"
|
||||
set -g @catppuccin_window_text " #{window_name} #{b:pane_current_path}"
|
||||
|
||||
# Load catppuccin
|
||||
run ~/.config/tmux/plugins/catppuccin/tmux/catppuccin.tmux
|
||||
|
||||
# Make the status line pretty and add some modules
|
||||
set-option -g status-position top
|
||||
@@ -23,10 +23,8 @@ set -g status-left "#[fg=#{@thm_teal},bg=#{@thm_crust}]#[fg=#{@thm_crust},bg=
|
||||
|
||||
#set -g status-left "#[fg=$thm_green,bg=$thm_bg,nobold,nounderscore,noitalics]#[fg=$thm_bg,bg=$thm_green,nobold,nounderscore,noitalics] #[fg=$thm_fg,bg=$thm_bg]#(hostname -s) "
|
||||
set -g status-right "#{E:@catppuccin_status_application}"
|
||||
#set -agF status-right "#{E:@catppuccin_status_cpu}"
|
||||
set -ag status-right "#{E:@catppuccin_status_session}"
|
||||
#set -ag status-right "#{E:@catppuccin_status_uptime}"
|
||||
#set -agF status-right "#{E:@catppuccin_status_battery}"
|
||||
|
||||
#run ~/.config/tmux/plugins/tmux-plugins/tmux-cpu/cpu.tmux
|
||||
#run ~/.config/tmux/plugins/tmux-plugins/tmux-battery/battery.tmux
|
||||
#
|
||||
#set -g pane-border-status top
|
||||
#set -g pane-border-format "#{pane_index} #{pane_current_command}"
|
||||
|
||||
112
zshrc
112
zshrc
@@ -1,4 +1,109 @@
|
||||
export PATH="${HOMEBREW_PREFIX}/opt/openssl/bin:$PATH"
|
||||
# ~~~ Minh Config
|
||||
# Optimized .zshrc for improved startup time
|
||||
# Enable profiling when needed: zmodload zsh/zprof
|
||||
|
||||
# ~~~~~~~~~~~~~~~~~~~~~~ Environment Setup ~~~~~~~~~~~~~~~~~~~~~~
|
||||
# XDG Base Directory Specification
|
||||
export XDG_CONFIG_HOME="$HOME/.config"
|
||||
export XDG_CACHE_HOME="$HOME/.cache"
|
||||
export XDG_DATA_HOME="$HOME/.local/share"
|
||||
|
||||
# Language and compilation
|
||||
export LANG=en_US.UTF-8
|
||||
|
||||
# ~~~~~~~~~~~~~~~~~~~~~~ Homebrew Setup ~~~~~~~~~~~~~~~~~~~~~~
|
||||
if [[ -f "/opt/homebrew/bin/brew" ]]; then
|
||||
eval "$(/opt/homebrew/bin/brew shellenv)"
|
||||
fi
|
||||
|
||||
# ~~~~~~~~~~~~~~~~~~~~~~ Core Zsh Configuration ~~~~~~~~~~~~~~~~~~~~~~
|
||||
# Enable completion system (call compinit only once)
|
||||
autoload -Uz compinit
|
||||
|
||||
# Check if compinit needs to be run (once per day for performance)
|
||||
for dump in ~/.zcompdump(N.mh+24); do
|
||||
compinit
|
||||
break
|
||||
done
|
||||
[[ -z "$dump" ]] && compinit -C
|
||||
|
||||
# Enhanced completion styling for better UX
|
||||
zstyle ':completion:*' menu select
|
||||
zstyle ':completion:*' matcher-list 'm:{a-zA-Z}={A-Za-z}' 'r:|[._-]=* r:|=* l:|=*'
|
||||
zstyle ':completion:*' list-colors ${(s.:.)LS_COLORS}
|
||||
zstyle ':completion:*' completer _complete _match _approximate
|
||||
zstyle ':completion:*:match:*' original only
|
||||
zstyle ':completion:*:approximate:*' max-errors 1 numeric
|
||||
zstyle ':completion:*' use-cache on
|
||||
zstyle ':completion:*' cache-path ~/.zsh/cache
|
||||
|
||||
# Ensure cache directory exists
|
||||
[[ ! -d ~/.zsh/cache ]] && mkdir -p ~/.zsh/cache
|
||||
|
||||
# Group completions by category
|
||||
zstyle ':completion:*' group-name ''
|
||||
zstyle ':completion:*:descriptions' format '%B%d%b'
|
||||
zstyle ':completion:*:messages' format '%d'
|
||||
zstyle ':completion:*:warnings' format 'No matches for: %d'
|
||||
|
||||
# Process completion improvements
|
||||
zstyle ':completion:*:*:kill:*:processes' list-colors '=(#b) #([0-9]#) ([0-9a-z-]#)*=01;34=0=01'
|
||||
zstyle ':completion:*:*:*:*:processes' command "ps -u $USER -o pid,user,comm -w -w"
|
||||
|
||||
# ~~~~~~~~~~~~~~~~~~~~~~ Plugin Loading (Conditional) ~~~~~~~~~~~~~~~~~~~~~~
|
||||
# Function to load plugins if they exist
|
||||
load_plugin() {
|
||||
[[ -f "$1" ]] && source "$1"
|
||||
}
|
||||
|
||||
# Load zsh plugins
|
||||
load_plugin "$HOMEBREW_PREFIX/share/zsh-autosuggestions/zsh-autosuggestions.zsh"
|
||||
load_plugin "$HOMEBREW_PREFIX/share/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh"
|
||||
load_plugin "$HOMEBREW_PREFIX/share/zsh-history-substring-search/zsh-history-substring-search.zsh"
|
||||
load_plugin "$XDG_CONFIG_HOME/zsh-z/zsh-z.plugin.zsh"
|
||||
|
||||
# ~~~~~~~~~~~~~~~~~~~~~~ Zsh-Autosuggestions Configuration ~~~~~~~~~~~~~~~~~~~~~~
|
||||
# Configure autosuggestions for seamless history integration
|
||||
ZSH_AUTOSUGGEST_HIGHLIGHT_STYLE="fg=#555555,bold"
|
||||
ZSH_AUTOSUGGEST_STRATEGY=(history completion)
|
||||
ZSH_AUTOSUGGEST_BUFFER_MAX_SIZE=20
|
||||
ZSH_AUTOSUGGEST_USE_ASYNC=true
|
||||
ZSH_AUTOSUGGEST_MANUAL_REBIND=1
|
||||
|
||||
# History-based suggestions prioritization
|
||||
ZSH_AUTOSUGGEST_HISTORY_IGNORE="(ls|cd|pwd|exit|clear)"
|
||||
|
||||
# ~~~~~~~~~~~~~~~~~~~~~~ Completion Setup ~~~~~~~~~~~~~~~~~~~~~~
|
||||
# Add homebrew completions if available
|
||||
if command -v brew &>/dev/null; then
|
||||
fpath+="$HOMEBREW_PREFIX/share/zsh-completions"
|
||||
fpath+="$HOMEBREW_PREFIX/share/zsh/site-functions"
|
||||
fi
|
||||
|
||||
# ~~~~~~~~~~~~~~~~~~~~~~ Editor & Shell Configuration ~~~~~~~~~~~~~~~~~~~~~~
|
||||
if [[ -n $SSH_CONNECTION ]]; then
|
||||
export EDITOR='vim'
|
||||
else
|
||||
export EDITOR='nvim'
|
||||
fi
|
||||
|
||||
# ~~~~~~~~~~~~~~~~~~~~~ History Configuration ~~~~~~~~~~~~~~~~~~~~~~
|
||||
HISTFILE=~/.zsh_history
|
||||
HISTSIZE=100000
|
||||
SAVEHIST=100000
|
||||
|
||||
# Enhanced history options for better autosuggestions
|
||||
setopt HIST_IGNORE_SPACE
|
||||
setopt HIST_IGNORE_DUPS
|
||||
setopt HIST_IGNORE_ALL_DUPS
|
||||
setopt HIST_SAVE_NO_DUPS
|
||||
setopt HIST_REDUCE_BLANKS
|
||||
setopt HIST_VERIFY
|
||||
|
||||
# ~~~ Bas Config
|
||||
|
||||
|
||||
export PATH="${HOME}/bin:${HOMEBREW_PREFIX}/opt/openssl/bin:$PATH"
|
||||
|
||||
eval "$(direnv hook zsh)"
|
||||
|
||||
@@ -23,6 +128,8 @@ git_info() {
|
||||
}
|
||||
setopt PROMPT_SUBST
|
||||
PROMPT='%F{green}%n@%m %F{blue}%~ %F{yellow}$(git_info)%f %# '
|
||||
export OPENAI_API_KEY=$(cat ~/.openai.key)
|
||||
export KAGI_API_KEY=$(cat ~/.kagi.key)
|
||||
|
||||
eval "$(zoxide init zsh)"
|
||||
alias cd=z
|
||||
@@ -32,3 +139,6 @@ Reminders:
|
||||
|
||||
Use z
|
||||
EOF
|
||||
|
||||
export SSH_AUTH_SOCK=~/Library/Group\ Containers/2BUA8C4S2C.com.1password/t/agent.sock
|
||||
source ~/.zsh/zsh-vim-mode/zsh-vim-mode.plugin.zsh
|
||||
|
||||
Reference in New Issue
Block a user