Skip to content

Commit ea857e5

Browse files
committed
fix(windows): set XDG_CONFIG_HOME and fix Lazy sync syntax
1 parent 33dd2fe commit ea857e5

1 file changed

Lines changed: 6 additions & 1 deletion

File tree

home/.chezmoiscripts/run_onchange_after_bootstrap_windows.ps1.tmpl

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,6 +107,11 @@ if ($isAdmin) {
107107
# Refresh PATH so newly installed tools are available
108108
$env:PATH = [System.Environment]::GetEnvironmentVariable("PATH", "Machine") + ";" + [System.Environment]::GetEnvironmentVariable("PATH", "User")
109109
110+
# Set XDG_CONFIG_HOME so XDG-aware tools (nvim, etc.) find configs at ~/.config
111+
$xdgTarget = "$env:USERPROFILE\.config"
112+
[System.Environment]::SetEnvironmentVariable("XDG_CONFIG_HOME", $xdgTarget, "User")
113+
$env:XDG_CONFIG_HOME = $xdgTarget
114+
110115
# Install mise-managed tools (does not require elevation)
111116
if (Get-Command mise -ErrorAction SilentlyContinue) {
112117
Write-Host "Running mise install..."
@@ -117,6 +122,6 @@ if (Get-Command mise -ErrorAction SilentlyContinue) {
117122
# Sync Neovim plugins
118123
if (Get-Command nvim -ErrorAction SilentlyContinue) {
119124
Write-Host "Syncing Neovim plugins..."
120-
nvim --headless -c "Lazy! sync" -c "qa"
125+
nvim --headless "+Lazy! sync" +qa
121126
}
122127
{{- end }}

0 commit comments

Comments
 (0)