Replace Oh My Zsh direct loading with Sheldon plugin manager
- Add Sheldon configuration in sheldon/plugins.toml - Configure Sheldon to manage Oh My Zsh library and plugins - Load Spaceship prompt, 14 OMZ plugins, and custom plugins via Sheldon - Simplify zshrc by moving plugin configuration to Sheldon - Keep OMZ compatibility variables for plugin functionality - Improve startup performance with Sheldon's caching Benefits: - Faster shell startup with cached plugin loading - Better dependency management through git submodules - Cleaner separation of concerns (plugins.toml vs zshrc) 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
93
sheldon/plugins.toml
Normal file
93
sheldon/plugins.toml
Normal file
@@ -0,0 +1,93 @@
|
||||
shell = "zsh"
|
||||
|
||||
[templates]
|
||||
defer = "{{ hooks?.pre | nl }}{% for file in files %}zsh-defer source \"{{ file }}\"\n{% endfor %}{{ hooks?.post | nl }}"
|
||||
|
||||
# Spaceship prompt - loaded first
|
||||
[plugins.spaceship]
|
||||
local = "~/.dotfiles/zsh/spaceship-prompt"
|
||||
use = ["spaceship.zsh"]
|
||||
apply = ["source"]
|
||||
|
||||
[plugins.spaceship-config]
|
||||
local = "~/.dotfiles/zsh"
|
||||
use = ["spaceship.zsh"]
|
||||
apply = ["source"]
|
||||
|
||||
# Oh My Zsh library - load all lib files
|
||||
[plugins.oh-my-zsh-lib]
|
||||
local = "~/.dotfiles/zsh/oh-my-zsh/lib"
|
||||
use = ["*.zsh"]
|
||||
apply = ["source"]
|
||||
|
||||
# Oh My Zsh plugins
|
||||
[plugins.git]
|
||||
local = "~/.dotfiles/zsh/oh-my-zsh/plugins/git"
|
||||
use = ["git.plugin.zsh"]
|
||||
apply = ["source"]
|
||||
|
||||
[plugins.docker]
|
||||
local = "~/.dotfiles/zsh/oh-my-zsh/plugins/docker"
|
||||
use = ["*.zsh"]
|
||||
apply = ["source"]
|
||||
|
||||
[plugins.docker-compose]
|
||||
local = "~/.dotfiles/zsh/oh-my-zsh/plugins/docker-compose"
|
||||
use = ["*.zsh"]
|
||||
apply = ["source"]
|
||||
|
||||
[plugins.tmux]
|
||||
local = "~/.dotfiles/zsh/oh-my-zsh/plugins/tmux"
|
||||
use = ["*.zsh"]
|
||||
apply = ["source"]
|
||||
|
||||
[plugins.z]
|
||||
local = "~/.dotfiles/zsh/oh-my-zsh/plugins/z"
|
||||
use = ["*.zsh"]
|
||||
apply = ["source"]
|
||||
|
||||
[plugins.command-not-found]
|
||||
local = "~/.dotfiles/zsh/oh-my-zsh/plugins/command-not-found"
|
||||
use = ["*.zsh"]
|
||||
apply = ["source"]
|
||||
|
||||
[plugins.history-substring-search]
|
||||
local = "~/.dotfiles/zsh/oh-my-zsh/plugins/history-substring-search"
|
||||
use = ["*.zsh"]
|
||||
apply = ["source"]
|
||||
|
||||
[plugins.colored-man-pages]
|
||||
local = "~/.dotfiles/zsh/oh-my-zsh/plugins/colored-man-pages"
|
||||
use = ["*.zsh"]
|
||||
apply = ["source"]
|
||||
|
||||
[plugins.extract]
|
||||
local = "~/.dotfiles/zsh/oh-my-zsh/plugins/extract"
|
||||
use = ["*.zsh"]
|
||||
apply = ["source"]
|
||||
|
||||
[plugins.sudo]
|
||||
local = "~/.dotfiles/zsh/oh-my-zsh/plugins/sudo"
|
||||
use = ["*.zsh"]
|
||||
apply = ["source"]
|
||||
|
||||
[plugins.cp]
|
||||
local = "~/.dotfiles/zsh/oh-my-zsh/plugins/cp"
|
||||
use = ["*.zsh"]
|
||||
apply = ["source"]
|
||||
|
||||
[plugins.dirhistory]
|
||||
local = "~/.dotfiles/zsh/oh-my-zsh/plugins/dirhistory"
|
||||
use = ["*.zsh"]
|
||||
apply = ["source"]
|
||||
|
||||
# Custom plugins (submodules)
|
||||
[plugins.zsh-autosuggestions]
|
||||
local = "~/.dotfiles/zsh/custom-plugins/zsh-autosuggestions"
|
||||
use = ["zsh-autosuggestions.zsh"]
|
||||
apply = ["source"]
|
||||
|
||||
[plugins.zsh-syntax-highlighting]
|
||||
local = "~/.dotfiles/zsh/custom-plugins/zsh-syntax-highlighting"
|
||||
use = ["zsh-syntax-highlighting.zsh"]
|
||||
apply = ["source"]
|
||||
43
zshrc
43
zshrc
@@ -124,45 +124,16 @@ fts() {
|
||||
# fi
|
||||
# }
|
||||
|
||||
# Oh My Zsh configuration
|
||||
# Oh My Zsh compatibility settings (for OMZ plugins)
|
||||
export ZSH="$HOME/.dotfiles/zsh/oh-my-zsh"
|
||||
export ZSH_CACHE_DIR="$HOME/.cache/oh-my-zsh"
|
||||
mkdir -p "$ZSH_CACHE_DIR/completions"
|
||||
|
||||
# Use Spaceship prompt (already configured as submodule)
|
||||
# ZSH_THEME is not needed when using external prompt like Spaceship
|
||||
ZSH_THEME=""
|
||||
# Sheldon plugin manager
|
||||
export SHELDON_CONFIG_FILE="$HOME/.dotfiles/sheldon/plugins.toml"
|
||||
|
||||
# Oh My Zsh settings
|
||||
CASE_SENSITIVE="false"
|
||||
HYPHEN_INSENSITIVE="true"
|
||||
DISABLE_AUTO_UPDATE="true" # Managed via git submodule
|
||||
DISABLE_UPDATE_PROMPT="true"
|
||||
ENABLE_CORRECTION="true"
|
||||
COMPLETION_WAITING_DOTS="true"
|
||||
HIST_STAMPS="yyyy-mm-dd"
|
||||
|
||||
# Plugins
|
||||
plugins=(
|
||||
git
|
||||
docker
|
||||
docker-compose
|
||||
tmux
|
||||
z
|
||||
command-not-found
|
||||
history-substring-search
|
||||
colored-man-pages
|
||||
extract
|
||||
sudo
|
||||
cp
|
||||
dirhistory
|
||||
zsh-autosuggestions
|
||||
zsh-syntax-highlighting # Must be last
|
||||
)
|
||||
|
||||
source $ZSH/oh-my-zsh.sh
|
||||
|
||||
# Load Spaceship prompt
|
||||
source ~/.dotfiles/zsh/spaceship-prompt/spaceship.zsh
|
||||
source ~/.dotfiles/zsh/spaceship.zsh
|
||||
# Cache Sheldon plugins for faster startup
|
||||
eval "$(sheldon source)"
|
||||
|
||||
# Plugin customizations
|
||||
# zsh-autosuggestions
|
||||
|
||||
Reference in New Issue
Block a user