plugins: add option to toggle asdf
This commit is contained in:
parent
ba91f1fe55
commit
a9a28656b7
|
@ -23,6 +23,7 @@ variables:
|
|||
bar_pos: top
|
||||
tmux: false
|
||||
starship: false
|
||||
asdf: false
|
||||
user_svdir: $HOME/.config/runit
|
||||
|
||||
accent_fg: '#ffffff'
|
||||
|
|
|
@ -8,6 +8,9 @@
|
|||
set -U fish_features stderr-nocaret qmark-noglob regex-easyesc
|
||||
|
||||
if status is-interactive
|
||||
{%@@ if asdf @@%}
|
||||
set asdf
|
||||
{%@@ endif @@%}
|
||||
|
||||
source {$__fish_config_dir}/env.fish
|
||||
source {$__fish_config_dir}/wm.fish
|
||||
|
|
|
@ -17,11 +17,13 @@ set -x XDG_DATA_DIRS "$XDG_DATA_DIRS:$HOME/.local/share"
|
|||
|
||||
set -x XDG_CONFIG_HOME "$HOME/.config/"
|
||||
|
||||
set __cargo_asdf_bin ~/.asdf/installs/rust/*/bin/
|
||||
set __yarn_asdf_bin ~/.config/yarn/global/node_modules/.bin/
|
||||
if set -q asdf
|
||||
set __cargo_asdf_bin ~/.asdf/installs/rust/*/bin/
|
||||
set __yarn_asdf_bin ~/.config/yarn/global/node_modules/.bin/
|
||||
end
|
||||
|
||||
for i in ~/.local/bin $__cargo_asdf_bin $__yarn_asdf_bin ~/.yarn/bin ~/.factorio/bin/*
|
||||
test -d "$i";and fish_add_path "$i"
|
||||
test -d "$i";and fish_add_path --global "$i"
|
||||
end
|
||||
|
||||
# needed for tmux
|
||||
|
|
|
@ -8,7 +8,9 @@ if not functions -q fundle
|
|||
and test "$USER" != root
|
||||
eval (curl -sfL https://git.io/fundle-install)
|
||||
end
|
||||
# fundle plugin 'FabioAntunes/fish-nvm'
|
||||
if not set -q asdf
|
||||
fundle plugin 'FabioAntunes/fish-nvm'
|
||||
end
|
||||
fundle plugin 'edc/bass'
|
||||
fundle init
|
||||
|
||||
|
@ -25,37 +27,42 @@ command -qs direnv &&
|
|||
# asdf Version manager
|
||||
##################################################
|
||||
|
||||
if not test -d ~/.asdf
|
||||
and test "$USER" != root
|
||||
git clone https://github.com/asdf-vm/asdf.git ~/.asdf --branch v0.9.0
|
||||
mkdir -p ~/.config/fish/completions
|
||||
and ln -s ~/.asdf/completions/asdf.fish ~/.config/fish/completions
|
||||
if set -q asdf
|
||||
if not test -d ~/.asdf
|
||||
and test "$USER" != root
|
||||
git clone https://github.com/asdf-vm/asdf.git ~/.asdf --branch v0.9.0
|
||||
mkdir -p ~/.config/fish/completions
|
||||
and ln -s ~/.asdf/completions/asdf.fish ~/.config/fish/completions
|
||||
|
||||
source ~/.asdf/asdf.fish
|
||||
source ~/.asdf/asdf.fish
|
||||
|
||||
asdf plugin add nodejs
|
||||
asdf install nodejs 12.13.1
|
||||
asdf install nodejs latest
|
||||
asdf global nodejs latest
|
||||
asdf plugin add nodejs
|
||||
asdf install nodejs 12.13.1
|
||||
asdf install nodejs latest
|
||||
asdf global nodejs latest
|
||||
|
||||
asdf plugin-add yarn
|
||||
asdf install yarn latest
|
||||
asdf global yarn latest
|
||||
asdf plugin-add yarn
|
||||
asdf install yarn latest
|
||||
asdf global yarn latest
|
||||
|
||||
asdf plugin add rust
|
||||
asdf install rust nightly
|
||||
asdf global rust nightly
|
||||
asdf plugin add rust
|
||||
asdf install rust nightly
|
||||
asdf global rust nightly
|
||||
|
||||
end
|
||||
|
||||
test -f ~/.asdf/asdf.fish
|
||||
and source ~/.asdf/asdf.fish
|
||||
end
|
||||
|
||||
test -f ~/.asdf/asdf.fish
|
||||
and source ~/.asdf/asdf.fish
|
||||
|
||||
|
||||
##################################################
|
||||
# Rust tools
|
||||
##################################################
|
||||
|
||||
command -qs rustup
|
||||
or _install-rustup &> /dev/null &
|
||||
|
||||
command -qs sccache
|
||||
or _install-sccache &> /dev/null &
|
||||
# set -x RUSTC_WRAPPER sccache
|
||||
|
|
|
@ -0,0 +1,3 @@
|
|||
#!/bin/sh
|
||||
|
||||
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
|
Reference in New Issue