chezmoi: windows symlink for config
This commit is contained in:
parent
72e4a9f3c7
commit
8d19e64087
@ -27,4 +27,4 @@ keymap("<C-e>", "<Plug>luasnip-next-choice", { mode = { "s", "i" } })
|
||||
-- snippets
|
||||
--------------------------------
|
||||
|
||||
require("luasnip.loaders.from_lua").load({paths = vim.env.XDG_CONFIG_HOME .. "/nvim/snippets"})
|
||||
require("luasnip.loaders.from_lua").load({paths = vim.fn.stdpath("config") .. "/snippets"})
|
||||
|
27
src/run_after__symlink-config_windows.ps1.tmpl
Normal file
27
src/run_after__symlink-config_windows.ps1.tmpl
Normal file
@ -0,0 +1,27 @@
|
||||
{{- /* symlink into ~/.config and ~/.local/share/ on windows */ -}}
|
||||
|
||||
{{- $roamingconfdirs := list "alacritty" "nushell" -}}
|
||||
{{- $localconfdirs := list "nvim" -}}
|
||||
|
||||
{{- if eq .chezmoi.os "windows" -}}
|
||||
$userdir = ([Environment]::GetFolderPath("UserProfile"))
|
||||
$roamingconfdir = ([Environment]::GetFolderPath("ApplicationData"))
|
||||
$localconfdir = ([Environment]::GetFolderPath("LocalApplicationData"))
|
||||
|
||||
{{ range $roamingconfdirs }}
|
||||
If (-Not (Test-Path $roamingconfdir\{{ . }})) {
|
||||
New-Item -Path $roamingconfdir\{{ . }} -ItemType Junction -Value $userdir\.config\{{ . }}
|
||||
}
|
||||
{{ end }}
|
||||
|
||||
{{ range $localconfdirs }}
|
||||
If (-Not (Test-Path $localconfdir\{{ . }})) {
|
||||
New-Item -Path $localconfdir\{{ . }} -ItemType Junction -Value $userdir\.config\{{ . }}
|
||||
}
|
||||
{{ end }}
|
||||
|
||||
If (-Not (Test-Path $localconfdir\nvim-data\site)) {
|
||||
New-Item -Path $localconfdir\nvim-data\site -ItemType Junction -Value $userdir\.local\share\nvim\site
|
||||
}
|
||||
|
||||
{{- end -}}
|
Loading…
Reference in New Issue
Block a user