From b504e16f941470d46c0f8495f7ea4368e5d14871 Mon Sep 17 00:00:00 2001 From: Thomas Schmucker Date: Thu, 23 Jul 2026 10:00:34 +0200 Subject: windows: install-win.cmd durch install-win.ps1 ersetzt, neovim-dict-win.ps1 ergaenzt install-win.cmd entfernt, install-win.ps1 (reines PowerShell) uebernimmt dieselbe Aufgabe (Config-Kopie nach %LOCALAPPDATA%\nvim, .gitconfig, config-up2parts, npmrc). Ausserdem bootstrap/neovim-dict-win.ps1 als PowerShell-Pendant zu bootstrap/neovim-dict.sh: laedt die deutschen Rechtschreib-Woerterbuecher nach %LOCALAPPDATA%\nvim-data\site\spell. neovim-windows-setup.md aktualisiert: verweist jetzt durchgehend auf die .ps1-Skripte statt .cmd/Git-Bash, Python-Installationsschritt entfernt (Provider ist deaktiviert), Stolperstein-Liste bereinigt. --- bootstrap/neovim-dict-win.ps1 | 64 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 64 insertions(+) create mode 100644 bootstrap/neovim-dict-win.ps1 (limited to 'bootstrap/neovim-dict-win.ps1') diff --git a/bootstrap/neovim-dict-win.ps1 b/bootstrap/neovim-dict-win.ps1 new file mode 100644 index 0000000..6c0c710 --- /dev/null +++ b/bootstrap/neovim-dict-win.ps1 @@ -0,0 +1,64 @@ +#Requires -Version 5.1 +<# + Windows-natives Pendant zu bootstrap/neovim-dict.sh. + Laedt die deutschen Rechtschreib-Woerterbuecher fuer Neovim herunter. + bootstrap/neovim-dict.sh bleibt unveraendert. + + Aufruf: + .\bootstrap\neovim-dict-win.ps1 + + Falls die Ausfuehrung durch die Execution Policy blockiert wird: + powershell -ExecutionPolicy Bypass -File .\bootstrap\neovim-dict-win.ps1 +#> + +$ErrorActionPreference = "Stop" + +function Write-Ok($msg) { + Write-Host "OK $msg" -ForegroundColor Green +} + +function Write-Step($msg) { + Write-Host "==> $msg" -ForegroundColor Cyan +} + +function Write-SkipMsg($msg) { + Write-Host "- $msg bereits vorhanden" -ForegroundColor DarkGray +} + +# Nativer Windows-Datenpfad von Neovim (kein XDG_DATA_HOME gesetzt): +# $env:LOCALAPPDATA\nvim-data\site\spell +$SpellDir = Join-Path $env:LOCALAPPDATA "nvim-data\site\spell" + +$Urls = @( + "https://ftp.nluug.nl/pub/vim/runtime/spell/de.utf-8.spl", + "https://ftp.nluug.nl/pub/vim/runtime/spell/de.utf-8.sug" +) + +function Get-SpellFile([string]$Url) { + $fileName = Split-Path -Leaf $Url + $dest = Join-Path $SpellDir $fileName + + if (Test-Path $dest) { + Write-SkipMsg $fileName + return + } + + Write-Step "Lade $fileName herunter" + Invoke-WebRequest -Uri $Url -OutFile $dest + Write-Ok $fileName +} + +function Main { + if (-not (Test-Path $SpellDir)) { + New-Item -ItemType Directory -Path $SpellDir -Force | Out-Null + } + + foreach ($url in $Urls) { + Get-SpellFile $url + } + + Write-Host "" + Write-Host "Woerterbuecher fuer Neovim installiert!" -ForegroundColor Green +} + +Main -- cgit v1.3