mirror of
https://github.com/jimeh/dotfiles.git
synced 2026-02-19 13:46:41 +00:00
feat(tools): migrate to mise (formally known as rtx)
This commit is contained in:
@@ -1,3 +1,3 @@
|
|||||||
# Default Gems installed by rtx when installing new Ruby versions.
|
# Default Gems installed by mise when installing new Ruby versions.
|
||||||
foreman
|
foreman
|
||||||
rubocop
|
rubocop
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
# Default Go packages installed by rtx when installing new Go versions.
|
# Default Go packages installed by mise when installing new Go versions.
|
||||||
github.com/nametake/golangci-lint-langserver@latest
|
github.com/nametake/golangci-lint-langserver@latest
|
||||||
golang.org/x/tools/cmd/goimports@latest
|
golang.org/x/tools/cmd/goimports@latest
|
||||||
golang.org/x/tools/gopls@latest
|
golang.org/x/tools/gopls@latest
|
||||||
|
|||||||
@@ -15,7 +15,7 @@ SYMLINKS=(
|
|||||||
bitbar
|
bitbar
|
||||||
coffeelint.json
|
coffeelint.json
|
||||||
config/kitty/kitty.conf
|
config/kitty/kitty.conf
|
||||||
config/rtx/config.toml
|
config/mise/config.toml
|
||||||
config/solargraph/config.yml
|
config/solargraph/config.yml
|
||||||
config/starship.toml
|
config/starship.toml
|
||||||
default-gems
|
default-gems
|
||||||
|
|||||||
@@ -52,7 +52,7 @@ fi
|
|||||||
|
|
||||||
_setup-kubectx-completion() {
|
_setup-kubectx-completion() {
|
||||||
local cmd="$1"
|
local cmd="$1"
|
||||||
local dir="$HOME/.local/share/rtx/installs/kubectx/latest/completion"
|
local dir="$HOME/.local/share/mise/installs/kubectx/latest/completion"
|
||||||
local target="$ZSH_COMPLETIONS/_${cmd}"
|
local target="$ZSH_COMPLETIONS/_${cmd}"
|
||||||
|
|
||||||
if [ -f "$target" ] || [ ! -d "$dir" ]; then
|
if [ -f "$target" ] || [ ! -d "$dir" ]; then
|
||||||
@@ -74,10 +74,10 @@ _setup-kubectx-completion() {
|
|||||||
autoload -U compinit && compinit
|
autoload -U compinit && compinit
|
||||||
}
|
}
|
||||||
|
|
||||||
if command-exists kubectx && ! which _kubectx &> /dev/null; then
|
if command-exists kubectx; then
|
||||||
_setup-kubectx-completion kubectx
|
_setup-kubectx-completion kubectx
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if command-exists kubens && ! which _kubens &> /dev/null; then
|
if command-exists kubens; then
|
||||||
_setup-kubectx-completion kubens
|
_setup-kubectx-completion kubens
|
||||||
fi
|
fi
|
||||||
|
|||||||
6
zshenv
6
zshenv
@@ -230,9 +230,9 @@ if command-exists sccache; then
|
|||||||
export RUSTC_WRAPPER=sccache
|
export RUSTC_WRAPPER=sccache
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# rtx setup
|
# mise setup
|
||||||
path_prepend "$HOME/.local/share/rtx/bin"
|
path_prepend "$HOME/.local/share/mise/bin"
|
||||||
path_prepend "$HOME/.local/share/rtx/shims"
|
path_prepend "$HOME/.local/share/mise/shims"
|
||||||
|
|
||||||
# orbstack setup
|
# orbstack setup
|
||||||
source-if-exists "$HOME/.orbstack/shell/init.zsh"
|
source-if-exists "$HOME/.orbstack/shell/init.zsh"
|
||||||
|
|||||||
40
zshrc
40
zshrc
@@ -91,25 +91,31 @@ if command-exists direnv; then
|
|||||||
eval "$(direnv hook zsh)"
|
eval "$(direnv hook zsh)"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
RTX_HOME="$HOME/.local/share/rtx"
|
MISE_HOME="$HOME/.local/share/mise"
|
||||||
RTX_INIT="$RTX_HOME/shell/init.zsh"
|
MISE_INIT="$MISE_HOME/shell/init.zsh"
|
||||||
export RTX_INSTALL_PATH="$RTX_HOME/bin/rtx"
|
MISE_COMPLETIONS_PATH="${ZSH_COMPLETIONS}/_mise"
|
||||||
|
export MISE_INSTALL_PATH="$MISE_HOME/bin/mise"
|
||||||
|
|
||||||
if ! command-exists rtx; then
|
if ! command-exists mise; then
|
||||||
read -q 'REPLY?rtx is not installed, install with `curl https://rtx.pub/install.sh | sh`? [y/N]:' &&
|
read -q 'REPLY?mise is not installed, install with `curl https://mise.jdx.dev/install.sh | sh`? [y/N]:' &&
|
||||||
echo && curl https://rtx.pub/install.sh | sh
|
echo && curl https://mise.jdx.dev/install.sh | sh
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ -f "$HOME/.local/share/rtx/bin/rtx" ]; then
|
if command-exists mise; then
|
||||||
path_prepend "$RTX_HOME/bin"
|
alias mi="mise"
|
||||||
fi
|
|
||||||
|
|
||||||
if command-exists rtx; then
|
if [ ! -f "$MISE_INIT" ] || [ "$MISE_INIT" -ot "$MISE_INSTALL_PATH" ]; then
|
||||||
if [ ! -f "$RTX_INIT" ] || [ "$RTX_INIT" -ot "$RTX_INSTALL_PATH" ]; then
|
mkdir -p "$(dirname "$MISE_INIT")"
|
||||||
mkdir -p "$(dirname "$RTX_INIT")"
|
mise activate zsh > "$MISE_INIT"
|
||||||
rtx activate zsh > "$RTX_INIT"
|
fi
|
||||||
|
source "$MISE_INIT"
|
||||||
|
|
||||||
|
if [ ! -f "$MISE_COMPLETIONS_PATH" ] || [ "$MISE_COMPLETIONS_PATH" -ot "$MISE_INSTALL_PATH" ]; then
|
||||||
|
echo "Setting up completion for mise -- $MISE_COMPLETIONS_PATH"
|
||||||
|
mkdir -p "$(dirname "$MISE_COMPLETIONS_PATH")"
|
||||||
|
mise completions zsh > "$MISE_COMPLETIONS_PATH"
|
||||||
|
chmod +x "$MISE_COMPLETIONS_PATH"
|
||||||
fi
|
fi
|
||||||
source "$RTX_INIT"
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# ==============================================================================
|
# ==============================================================================
|
||||||
@@ -117,8 +123,8 @@ fi
|
|||||||
# ==============================================================================
|
# ==============================================================================
|
||||||
|
|
||||||
if ! command-exists starship; then
|
if ! command-exists starship; then
|
||||||
read -q 'REPLY?starship is not installed, install with `rtx install starship`? [y/N]:' &&
|
read -q 'REPLY?starship is not installed, install with `mise install starship`? [y/N]:' &&
|
||||||
echo && rtx install starship
|
echo && mise install starship
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if command-exists starship; then
|
if command-exists starship; then
|
||||||
@@ -131,7 +137,7 @@ if command-exists starship; then
|
|||||||
compctl -K _starship starship
|
compctl -K _starship starship
|
||||||
else
|
else
|
||||||
echo "WARN: starship not found, skipping prompt setup" >&2
|
echo "WARN: starship not found, skipping prompt setup" >&2
|
||||||
echo " install with: rtx install starship" >&2
|
echo " install with: mise install starship" >&2
|
||||||
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user