Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 18 additions & 0 deletions .chezmoiexternal.toml → .chezmoiexternal.toml.tmpl
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
{{- $nvmRelease := (gitHubLatestRelease "nvm-sh/nvm").TagName | toString -}}

[".local/share/nvim/site/autoload/plug.vim"]
type = "file"
url = "https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim"
Expand Down Expand Up @@ -27,3 +29,19 @@ refreshPeriod = "168h"
type = "file"
url = "https://raw.githubusercontent.com/eza-community/eza-themes/refs/heads/main/themes/tokyonight.yml"
refreshPeriod = "168h"

[".nvm/nvm.sh"]
type = "file"
url = "https://raw.githubusercontent.com/nvm-sh/nvm/{{ $nvmRelease }}/nvm.sh"
refreshPeriod = "168h"

[".nvm/nvm-exec"]
type = "file"
url = "https://raw.githubusercontent.com/nvm-sh/nvm/{{ $nvmRelease }}/nvm-exec"
executable = true
refreshPeriod = "168h"

[".nvm/bash_completion"]
type = "file"
url = "https://raw.githubusercontent.com/nvm-sh/nvm/{{ $nvmRelease }}/bash_completion"
refreshPeriod = "168h"
10 changes: 5 additions & 5 deletions private_dot_local/share/zsh/scripts/nvm-lazy.zsh
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,9 @@
# - Minimal overhead: precmd detector only does file checks (no subshells)
# - chpwd hook only active while in a project

# Requires BREW_HOME to be set
[[ -z "$BREW_HOME" ]] && return
[[ ! -f "$BREW_HOME/opt/nvm/nvm.sh" ]] && return

# Export NVM_DIR for nvm to work properly
export NVM_DIR="$HOME/.nvm"
[[ ! -s "$NVM_DIR/nvm.sh" ]] && return

# Find .nvmrc from current dir up to git root (or current dir only if not in git repo)
_nvm_find_project_nvmrc() {
Expand Down Expand Up @@ -49,7 +46,10 @@ _nvm_load() {
unfunction nvm node npm npx 2>/dev/null

# Load nvm
source "$BREW_HOME/opt/nvm/nvm.sh"
source "$NVM_DIR/nvm.sh"
if [[ -s "$NVM_DIR/bash_completion" ]]; then
source "$NVM_DIR/bash_completion"
fi
}

# Full hook - only active while in a project
Expand Down
Loading