diff options
| author | Thomas Schmucker <ts@its1.de> | 2026-07-23 10:16:22 +0200 |
|---|---|---|
| committer | Thomas Schmucker <ts@its1.de> | 2026-07-23 10:16:22 +0200 |
| commit | bb70769ffdc3b93329f364f47c49148658a03d44 (patch) | |
| tree | 4f21bf43282989fa0d9a872b849e581fc55aad2b | |
| parent | b504e16f941470d46c0f8495f7ea4368e5d14871 (diff) | |
| download | dotfiles-bb70769ffdc3b93329f364f47c49148658a03d44.tar.gz dotfiles-bb70769ffdc3b93329f364f47c49148658a03d44.tar.bz2 dotfiles-bb70769ffdc3b93329f364f47c49148658a03d44.zip | |
windows: cmd-Style %VAR%-Syntax in PowerShell-Kontexten korrigiert
setx PATH "%PATH%;..." funktioniert in PowerShell nicht wie in cmd.exe
(kein automatisches Expandieren von %VAR%) und haette zusaetzlich den
kompletten Prozess-PATH inkl. System-Anteil dauerhaft in den User-PATH
kopiert. Ersetzt durch [Environment]::GetEnvironmentVariable/SetEnviron-
mentVariable("PATH", ..., "User") in bootstrap/neovim-win.ps1 und
neovim-windows-setup.md. Ausserdem klargestellt, dass windows/bin/gmake.cmd
bewusst die einzige Nicht-PowerShell-Datei im Windows-Zweig bleibt.
| -rw-r--r-- | bootstrap/neovim-win.ps1 | 7 | ||||
| -rw-r--r-- | neovim-windows-setup.md | 7 |
2 files changed, 9 insertions, 5 deletions
diff --git a/bootstrap/neovim-win.ps1 b/bootstrap/neovim-win.ps1 index 60ed0ea..a2e755b 100644 --- a/bootstrap/neovim-win.ps1 +++ b/bootstrap/neovim-win.ps1 | |||
| @@ -115,8 +115,11 @@ function Install-Tools { | |||
| 115 | 115 | ||
| 116 | # opt.makeprg = "gmake" (nvim/lua/config/options.lua) - Alias liegt in | 116 | # opt.makeprg = "gmake" (nvim/lua/config/options.lua) - Alias liegt in |
| 117 | # windows/bin/gmake.cmd, reicht an "make" durch. Einmalig windows\bin | 117 | # windows/bin/gmake.cmd, reicht an "make" durch. Einmalig windows\bin |
| 118 | # zum PATH hinzufuegen, z.B.: | 118 | # zum PATH hinzufuegen (PowerShell, User-Scope, nicht setx mit %PATH% |
| 119 | # setx PATH "%PATH%;%USERPROFILE%\dotfiles\windows\bin" | 119 | # verwenden - das wuerde den gesamten Prozess-PATH inkl. System-Anteil |
| 120 | # dauerhaft in den User-PATH kopieren): | ||
| 121 | # $userPath = [Environment]::GetEnvironmentVariable("PATH", "User") | ||
| 122 | # [Environment]::SetEnvironmentVariable("PATH", "$userPath;$env:USERPROFILE\dotfiles\windows\bin", "User") | ||
| 120 | Install-WingetPackage -Binary "make" -Id "GnuWin32.Make" | 123 | Install-WingetPackage -Binary "make" -Id "GnuWin32.Make" |
| 121 | } | 124 | } |
| 122 | 125 | ||
diff --git a/neovim-windows-setup.md b/neovim-windows-setup.md index bc27f4a..61c4b08 100644 --- a/neovim-windows-setup.md +++ b/neovim-windows-setup.md | |||
| @@ -2,7 +2,7 @@ | |||
| 2 | 2 | ||
| 3 | Checkliste für die Übernahme der bestehenden `nvim/`-Config aus dem Dotfiles-Repo auf ein natives Windows-System (kein WSL). Repo selbst bleibt unverändert. | 3 | Checkliste für die Übernahme der bestehenden `nvim/`-Config aus dem Dotfiles-Repo auf ein natives Windows-System (kein WSL). Repo selbst bleibt unverändert. |
| 4 | 4 | ||
| 5 | Alle Windows-Skripte in diesem Repo sind reines PowerShell (kein Git Bash, kein WSL). Falls die Ausführung durch die Execution Policy blockiert wird, entweder pro Aufruf `powershell -ExecutionPolicy Bypass -File .\skript.ps1` verwenden, oder einmalig `Set-ExecutionPolicy -Scope CurrentUser RemoteSigned`. | 5 | Alle Windows-Skripte in diesem Repo sind reines PowerShell (kein Git Bash, kein WSL) – mit einer Ausnahme: `windows\bin\gmake.cmd` ist ein trivialer Ein-Zeiler-Wrapper, für den sich eine `.ps1`-Datei nicht lohnt. Falls die Ausführung der `.ps1`-Skripte durch die Execution Policy blockiert wird, entweder pro Aufruf `powershell -ExecutionPolicy Bypass -File .\skript.ps1` verwenden, oder einmalig `Set-ExecutionPolicy -Scope CurrentUser RemoteSigned`. |
| 6 | 6 | ||
| 7 | ## 1. Grundwerkzeuge installieren | 7 | ## 1. Grundwerkzeuge installieren |
| 8 | 8 | ||
| @@ -41,9 +41,10 @@ Nach Änderungen im Repo `install-win.ps1` erneut ausführen, um die Kopien zu a | |||
| 41 | 41 | ||
| 42 | Installiert per `winget`/`npm`: Git, Node, Formatter (jq, prettier, ruff, shfmt, stylua, yamlfmt, gawk, xmllint), Tools (ripgrep, fd, tree-sitter-cli, zig als C-Compiler für Treesitter, make) und LSP-Server (basedpyright, bash-language-server, clangd, shellcheck, vscode-langservers-extracted, lua-language-server, prisma, vtsls). Einzelne Pakete, die fehlschlagen, werden als Warnung gemeldet statt das Skript abzubrechen – Details siehe Kopfkommentar im Skript (einige winget-IDs, v. a. GnuWin32.Gawk/Libxml2, google.yamlfmt, mvdan.shfmt, astral-sh.ruff, zig.zig, sind ungeprüft). | 42 | Installiert per `winget`/`npm`: Git, Node, Formatter (jq, prettier, ruff, shfmt, stylua, yamlfmt, gawk, xmllint), Tools (ripgrep, fd, tree-sitter-cli, zig als C-Compiler für Treesitter, make) und LSP-Server (basedpyright, bash-language-server, clangd, shellcheck, vscode-langservers-extracted, lua-language-server, prisma, vtsls). Einzelne Pakete, die fehlschlagen, werden als Warnung gemeldet statt das Skript abzubrechen – Details siehe Kopfkommentar im Skript (einige winget-IDs, v. a. GnuWin32.Gawk/Libxml2, google.yamlfmt, mvdan.shfmt, astral-sh.ruff, zig.zig, sind ungeprüft). |
| 43 | 43 | ||
| 44 | `windows\bin` (enthält `gmake.cmd`, Wrapper für `opt.makeprg = "gmake"`) danach einmalig zum PATH hinzufügen: | 44 | `windows\bin` (enthält `gmake.cmd`, Wrapper für `opt.makeprg = "gmake"`) danach einmalig zum PATH hinzufügen (PowerShell, User-Scope – nicht `setx PATH "%PATH%;..."` verwenden, das würde den kompletten Prozess-PATH inkl. System-Anteil dauerhaft in den User-PATH kopieren): |
| 45 | ```powershell | 45 | ```powershell |
| 46 | setx PATH "%PATH%;%USERPROFILE%\dotfiles\windows\bin" | 46 | $userPath = [Environment]::GetEnvironmentVariable("PATH", "User") |
| 47 | [Environment]::SetEnvironmentVariable("PATH", "$userPath;$env:USERPROFILE\dotfiles\windows\bin", "User") | ||
| 47 | ``` | 48 | ``` |
| 48 | 49 | ||
| 49 | ## 4. Bekannte Stolpersteine | 50 | ## 4. Bekannte Stolpersteine |
