diff --git a/src/dot_config/nvim/lua/snippets.lua b/src/dot_config/nvim/lua/snippets.lua index 1480949..af86f85 100644 --- a/src/dot_config/nvim/lua/snippets.lua +++ b/src/dot_config/nvim/lua/snippets.lua @@ -27,4 +27,4 @@ keymap("", "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"}) diff --git a/src/run_after__symlink-config_windows.ps1.tmpl b/src/run_after__symlink-config_windows.ps1.tmpl new file mode 100644 index 0000000..c4ef15d --- /dev/null +++ b/src/run_after__symlink-config_windows.ps1.tmpl @@ -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 -}}