diff --git a/dotfiles/.bashrc b/dotfiles/.bashrc index a7e005ff..02438bd5 100644 --- a/dotfiles/.bashrc +++ b/dotfiles/.bashrc @@ -237,6 +237,11 @@ if [ "$0" = 'bash' ] || [ "$0" = '/bin/bash' ]; then fi fi + ### Java (asdf) + if [ -f "$HOME/.asdf/plugins/java/set-java-home.bash" ]; then + . "$HOME/.asdf/plugins/java/set-java-home.bash" + fi + ### zoxide command -v zoxide >/dev/null && eval "$(zoxide init bash)" diff --git a/dotfiles/.config/asdf/asdfrc b/dotfiles/.config/asdf/asdfrc new file mode 100644 index 00000000..d851842c --- /dev/null +++ b/dotfiles/.config/asdf/asdfrc @@ -0,0 +1,8 @@ +# See the docs for explanations: https://asdf-vm.com/manage/configuration.html + +legacy_version_file = no +use_release_candidates = no +always_keep_download = no +plugin_repository_last_check_duration = 60 +disable_plugin_short_name_repository = no +java_macos_integration_enable = yes diff --git a/dotfiles/.config/asdf/default-cargo-pkgs b/dotfiles/.config/asdf/default-cargo-pkgs new file mode 100644 index 00000000..cd0df420 --- /dev/null +++ b/dotfiles/.config/asdf/default-cargo-pkgs @@ -0,0 +1,2 @@ +ripgrep +--git https://github.com/sharkdp/bat diff --git a/dotfiles/.config/asdf/default-golang-pkgs b/dotfiles/.config/asdf/default-golang-pkgs new file mode 100644 index 00000000..149ad0ba --- /dev/null +++ b/dotfiles/.config/asdf/default-golang-pkgs @@ -0,0 +1,8 @@ +github.com/uudashr/gopkgs/v2/cmd/gopkgs@latest +github.com/ramya-rao-a/go-outline@latest +github.com/cweill/gotests/...@latest +github.com/fatih/gomodifytags@latest +github.com/josharian/impl@latest +github.com/go-delve/delve/cmd/dlv@latest +golang.org/x/tools/gopls@latest +honnef.co/go/tools/cmd/staticcheck@latest diff --git a/dotfiles/.config/asdf/default-python-pkgs b/dotfiles/.config/asdf/default-python-pkgs new file mode 100644 index 00000000..e079f8a6 --- /dev/null +++ b/dotfiles/.config/asdf/default-python-pkgs @@ -0,0 +1 @@ +pytest diff --git a/dotfiles/.config/asdf/default-ruby-pkgs b/dotfiles/.config/asdf/default-ruby-pkgs new file mode 100644 index 00000000..b841526f --- /dev/null +++ b/dotfiles/.config/asdf/default-ruby-pkgs @@ -0,0 +1 @@ +bundler diff --git a/dotfiles/.profile b/dotfiles/.profile index 652b9da6..1567ea63 100644 --- a/dotfiles/.profile +++ b/dotfiles/.profile @@ -273,15 +273,25 @@ if [ -e /home/linuxbrew/.linuxbrew/bin/brew ]; then export INFOPATH="/home/linuxbrew/.linuxbrew/share/info:${INFOPATH:-}" fi +### Go +export GOPATH="${HOME}/.local/go" +export GO111MODULE=on +export PATH="$PATH:${GOPATH}/bin" + if command -v brew >/dev/null; then ### Go - export GOPATH="${HOME}/.local/go" GOROOT="$(brew --prefix golang)/libexec" export GOROOT - export GO111MODULE=on - export PATH="$PATH:${GOPATH}/bin:${GOROOT}/bin" + export PATH="$PATH:${GOROOT}/bin" ### ASDF + export ASDF_CONFIG_FILE="$HOME/.config/asdf/asdfrc" + export ASDF_DIR="$HOME/.local/asdf" + export ASDF_DATA_DIR="$HOME/.local/asdf" + export ASDF_CRATE_DEFAULT_PACKAGES_FILE="$HOME/.config/asdf/default-cargo-pkgs + export ASDF_GEM_DEFAULT_PACKAGES_FILE="$HOME/.config/asdf/default-ruby-pkgs + export ASDF_GOLANG_DEFAULT_PACKAGES_FILE="$HOME/.config/asdf/default-golang-pkgs + export ASDF_PYTHON_DEFAULT_PACKAGES_FILE="$HOME/.config/asdf/default-python-pkgs if [ -f "$(brew --prefix asdf)/libexec/asdf.sh" ]; then . "$(brew --prefix asdf)/libexec/asdf.sh" fi diff --git a/dotfiles/.zshrc b/dotfiles/.zshrc index a98b82b0..92210d97 100644 --- a/dotfiles/.zshrc +++ b/dotfiles/.zshrc @@ -352,6 +352,11 @@ if command -v brew > /dev/null; then [[ ! -f "$(brew --prefix)/Caskroom/google-cloud-sdk/latest/google-cloud-sdk/completion.zsh.inc" ]] || source "$(brew --prefix)/Caskroom/google-cloud-sdk/latest/google-cloud-sdk/completion.zsh.inc" fi +### Java (asdf) +if [ -f "$HOME/.asdf/plugins/java/set-java-home.zsh" ]; then + . "$HOME/.asdf/plugins/java/set-java-home.zsh" +fi + ## TODO: What is this line? fpath+=~/.zfunc