Migrate to mise from asdf
parent
566b391dcc
commit
85964e068f
47
Makefile
47
Makefile
|
@ -117,7 +117,7 @@ bootstrap_mac: check_os link bootstrap_common oh_my_zsh homebrew install_brew_ba
|
|||
@echo "Bootstrapped mac components!"
|
||||
|
||||
.PHONY: bootstrap_common
|
||||
bootstrap_common: check_os link_all_common prepare_projects_dir prepare_screenshots_dir prepare_scripts_cache_dir install_vim install_asdf alacritty_terminfo
|
||||
bootstrap_common: check_os link_all_common prepare_projects_dir prepare_screenshots_dir prepare_scripts_cache_dir install_vim install_mise alacritty_terminfo
|
||||
@echo "Bootstrapped common components!"
|
||||
|
||||
.PHONY: link
|
||||
|
@ -183,9 +183,9 @@ link_script_utils: check_os
|
|||
|
||||
.PHONY: link_tool_versions
|
||||
link_tool_versions: check_os
|
||||
@echo "Linking tool-versions file for asdf"
|
||||
@echo "Linking tool-versions file for mise"
|
||||
$(call link,tool-versions,.tool-versions)
|
||||
$(call link,config/asdf/.default-gems,.default-gems)
|
||||
$(call link,config/mise/.default-gems,.default-gems)
|
||||
|
||||
.PHONY: link_profile
|
||||
link_profile: check_os
|
||||
|
@ -286,42 +286,13 @@ install_brew_basics: homebrew check_os
|
|||
@echo "Installig basic brew packages..."
|
||||
@brew bundle --file $(DOTFILES_DIR)/installed_packages/core/Brewfile
|
||||
|
||||
.PHONY: install_asdf
|
||||
install_asdf: check_os
|
||||
@echo "Installing ASDF VM..."
|
||||
@git clone https://github.com/asdf-vm/asdf.git ~/.asdf --branch v0.10.0
|
||||
@echo "Installed ASDF Version 0.10.0"
|
||||
@echo "To install latest version:"
|
||||
@echo ""
|
||||
@echo "cd ~/.asdf"
|
||||
@echo "git fetch"
|
||||
@echo "git checkout \"$$\(git describe --abbrev=0 --tags\)\""
|
||||
@echo ""
|
||||
@echo "Consider installing configured ASDF tools:"
|
||||
@echo ""
|
||||
@echo ""
|
||||
@echo "Run in home directory:"
|
||||
@echo "asdf install"
|
||||
@echo ""
|
||||
@echo ""
|
||||
@echo "Consider installing ASDF plugins:"
|
||||
@echo "=================================="
|
||||
@echo "DIRENV:"
|
||||
@echo "----------------------------------"
|
||||
@echo "asdf plugin-add direnv"
|
||||
@echo "asdf install direnv latest"
|
||||
@echo ""
|
||||
@echo "Check out installed version using: "
|
||||
@echo "asdf list direnv"
|
||||
@echo ""
|
||||
@echo "Configure it as global using: "
|
||||
@echo "asdf global direnv $$version"
|
||||
@echo ""
|
||||
@echo "Configure it with provided function:"
|
||||
@echo "asdf direnv setup --shell fish --version latest"
|
||||
@echo ""
|
||||
.PHONY: install_mise
|
||||
install_mise: check_os
|
||||
@echo "Installing mise..."
|
||||
@curl https://mise.run | sh
|
||||
@mise direnv activate > ~/.config/direnv/lib/use_mise.sh
|
||||
@echo "When using in projects, put the following in .envrc: "
|
||||
@echo "use asdf"
|
||||
@echo "use mise"
|
||||
@echo "=================================="
|
||||
@echo ""
|
||||
|
||||
|
|
|
@ -18,8 +18,8 @@ if test -S $SERVER_NAME; then
|
|||
/usr/bin/wmctrl -a "$WINDOW_NAME"
|
||||
fi
|
||||
fi
|
||||
~/.asdf/shims/nvim --server $SERVER_NAME --remote $2
|
||||
~/.asdf/shims/nvim --server $SERVER_NAME --remote-send ":call cursor($LINE, $COLUMN)<CR>"
|
||||
~/.local/share/mise/shims/nvim --server $SERVER_NAME --remote $2
|
||||
~/.local/share/mise/shims/nvim --server $SERVER_NAME --remote-send ":call cursor($LINE, $COLUMN)<CR>"
|
||||
else
|
||||
/usr/bin/alacritty --title "$WINDOW_NAME" -e /usr/bin/fish -c "nvim --listen $SERVER_NAME $2 --cmd \"call cursor($LINE, $COLUMN)\""
|
||||
fi
|
||||
|
|
|
@ -71,23 +71,9 @@ then
|
|||
command vim +PlugUpdate +qall
|
||||
fi
|
||||
|
||||
if [ "${RUN[asdf]}" = "1" ]
|
||||
if [ "${RUN[mise]}" = "1" ]
|
||||
then
|
||||
asdf update
|
||||
asdf plugin-update --all
|
||||
|
||||
echo "========== ASDF UPDATES =========="
|
||||
echo "Available updates: "
|
||||
while IFS= read -r PKG; do
|
||||
if [ $(echo "$PKG" | cut -f3) = "missing" ]; then
|
||||
PKG_NAME=$(echo $PKG | cut -f1 -d " ")
|
||||
if [ "$PKG_NAME" != "java" -a "$PKG_NAME" != "ruby" ]; then
|
||||
PKG_VER=$(echo $PKG | cut -f2 -d " ")
|
||||
echo " $PKG_NAME - $PKG_VER (install with 'asdf install $PKG_NAME $PKG_VER' and set as global default with 'asdf global $PKG_NAME $PKG_VER')"
|
||||
fi
|
||||
fi
|
||||
done <<< "$(asdf latest --all)"
|
||||
echo "========== ASDF UPDATES =========="
|
||||
mise self-update
|
||||
fi
|
||||
|
||||
if [ "${RUN[brew]}" = "1" ]
|
||||
|
|
|
@ -1 +1,2 @@
|
|||
[general]
|
||||
import = ["~/.config/alacritty/font.toml", "~/.config/alacritty/colors.toml", "~/.config/alacritty/keymap.toml"]
|
||||
|
|
|
@ -0,0 +1,12 @@
|
|||
# if "usage" is not installed show an error
|
||||
if ! command -v usage &> /dev/null
|
||||
echo >&2
|
||||
echo "Error: usage CLI not found. This is required for completions to work in mise." >&2
|
||||
echo "See https://usage.jdx.dev for more information." >&2
|
||||
return 1
|
||||
end
|
||||
|
||||
if ! set -q _usage_spec_mise_2024_11_13
|
||||
set -g _usage_spec_mise_2024_11_13 (mise usage | string collect)
|
||||
end
|
||||
complete -xc mise -a '(usage complete-word --shell fish -s "$_usage_spec_mise_2024_11_13" -- (commandline -cop) (commandline -t))'
|
|
@ -2,7 +2,7 @@ fenv source ~/.profile
|
|||
|
||||
set -g fish_prompt_pwd_dir_length 0
|
||||
set -gx PROJECT_PATHS ~/Projects/*/* ~/Projects/Personal/Mixed\ Technology/Practice
|
||||
set -gx ASDF_PYTHON_DEFAULT_PACKAGES_FILE ~/.config/asdf/.python-default-packages
|
||||
set -gx MISE_PYTHON_DEFAULT_PACKAGES_FILE ~/.config/asdf/.python-default-packages
|
||||
set -gx FZF_DEFAULT_COMMAND 'rg --files'
|
||||
|
||||
if which termux-info &> /dev/null
|
||||
|
@ -29,27 +29,8 @@ abbr -a gcm "git checkout (__git.default_branch)"
|
|||
|
||||
source ~/.config/fish/platform_config/$MACHINE_TYPE.fish
|
||||
|
||||
if [ -f /opt/asdf-vm/asdf.sh ]
|
||||
set -gx ASDF_DIR /opt/asdf-vm
|
||||
set -gx ASDF_CONFIG_FILE $XDG_CONFIG_HOME/asdf/asdfrc
|
||||
set -gx ASDF_DATA_DIR $XDG_DATA_HOME/asdf
|
||||
source $ASDF_DIR/asdf.sh
|
||||
if status is-interactive
|
||||
mise activate fish | source
|
||||
else
|
||||
source ~/.asdf/asdf.fish
|
||||
if [ -f ~/.asdf/plugins/dotnet-core/set-dotnet-home.fish ]
|
||||
. ~/.asdf/plugins/dotnet-core/set-dotnet-home.fish
|
||||
end
|
||||
end
|
||||
|
||||
eval (asdf exec direnv hook fish | source)
|
||||
|
||||
function direnv
|
||||
asdf exec direnv "$argv"
|
||||
end
|
||||
|
||||
function asdfexec
|
||||
begin
|
||||
asdf shell $argv[1] $argv[2]
|
||||
$argv[3..]
|
||||
end
|
||||
mise activate fish --shims | source
|
||||
end
|
||||
|
|
|
@ -3,8 +3,8 @@
|
|||
" Explicit declaration of python host program to "prevent suprises"
|
||||
" -----------------------------------------------------------------------------
|
||||
if !has('win32')
|
||||
let g:python_host_prog = $HOME.'/.asdf/shims/python2'
|
||||
let g:python3_host_prog = $HOME.'/.asdf/shims/python3'
|
||||
let g:python_host_prog = $HOME.'/.local/share/mise/shims/python2'
|
||||
let g:python3_host_prog = $HOME.'/.local/share/mise/shims/python3'
|
||||
else
|
||||
let g:python_host_prog = $HOME.'/scoop/shims/python2'
|
||||
let g:python3_host_prog = $HOME.'/scoop/shims/python3'
|
||||
|
|
|
@ -82,7 +82,7 @@ end
|
|||
-- Flutter tools
|
||||
require("flutter-tools").setup({
|
||||
lsp = common_config,
|
||||
flutter_lookup_cmd = "asdf where flutter",
|
||||
flutter_lookup_cmd = "mise where flutter",
|
||||
})
|
||||
|
||||
-- Rust tools
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
" - Neovim ruby host -
|
||||
" -----------------------------------------------------------------------------
|
||||
if !has('win32')
|
||||
let g:ruby_host_prog = '~/.asdf/shims/ruby'
|
||||
let g:ruby_host_prog = '~/.local/share/mise/shims/ruby'
|
||||
else
|
||||
let g:ruby_host_prog = '~/scoop/shims/ruby'
|
||||
endif
|
||||
|
|
|
@ -3,7 +3,7 @@ Description=Rust analyzer multiplex server
|
|||
|
||||
[Service]
|
||||
Type=simple
|
||||
ExecStart=%h/.asdf/shims/ra-multiplex server
|
||||
ExecStart=%h/.cargo/bin/ra-multiplex server
|
||||
|
||||
[Install]
|
||||
WantedBy=default.target
|
||||
|
|
|
@ -57,6 +57,7 @@ tags
|
|||
|
||||
# ASDF
|
||||
.tool-versions
|
||||
mise.local.toml
|
||||
|
||||
# Idea
|
||||
.idea
|
||||
|
|
|
@ -21,7 +21,7 @@ done
|
|||
|
||||
declare -A RUN=()
|
||||
|
||||
for command in "pacman" "apt" "dnf" "flatpak" "gem" "nvim" "asdf" "brew" "pacman" "pip" "pip2" "pip3";
|
||||
for command in "pacman" "apt" "dnf" "flatpak" "gem" "nvim" "mise" "brew" "pacman" "pip" "pip2" "pip3";
|
||||
do
|
||||
if type $command > /dev/null 2>&1
|
||||
then
|
||||
|
|
|
@ -46,7 +46,7 @@ ZSH_THEME="agnoster"
|
|||
# Custom plugins may be added to ~/.oh-my-zsh/custom/plugins/
|
||||
# Example format: plugins=(rails git textmate ruby lighthouse)
|
||||
# Add wisely, as too many plugins slow down shell startup.
|
||||
plugins=(git mix asdf)
|
||||
plugins=(git mix)
|
||||
|
||||
# User configuration
|
||||
|
||||
|
|
|
@ -35,8 +35,6 @@ if [ -f "$HOME/.zshrc.local" ]; then
|
|||
source $HOME/.zshrc.local
|
||||
fi
|
||||
|
||||
source /usr/local/opt/asdf/asdf.sh
|
||||
|
||||
# Print update date
|
||||
print-last-brew-update
|
||||
|
||||
|
|
Loading…
Reference in New Issue