aboutsummaryrefslogtreecommitdiff
path: root/bootstrap-win/neovim-dict.ps1
diff options
context:
space:
mode:
authorThomas Schmucker <ts@its1.de>2026-07-27 10:06:17 +0200
committerThomas Schmucker <ts@its1.de>2026-07-27 10:06:17 +0200
commit19b0f50dcdcb517e0ea1362b3644a42a91844ab8 (patch)
tree3d02e30cf1da103a9757878b9aafc0fbd95c40b6 /bootstrap-win/neovim-dict.ps1
parent9433e7e35499ba5aa7a643b51c3d2101e174aa31 (diff)
parent7d29d60f7ca96cd0d76008345ec788671cfb7573 (diff)
downloaddotfiles-19b0f50dcdcb517e0ea1362b3644a42a91844ab8.tar.gz
dotfiles-19b0f50dcdcb517e0ea1362b3644a42a91844ab8.tar.bz2
dotfiles-19b0f50dcdcb517e0ea1362b3644a42a91844ab8.zip
Merge branch 'windows-port'
Diffstat (limited to 'bootstrap-win/neovim-dict.ps1')
-rw-r--r--bootstrap-win/neovim-dict.ps158
1 files changed, 58 insertions, 0 deletions
diff --git a/bootstrap-win/neovim-dict.ps1 b/bootstrap-win/neovim-dict.ps1
new file mode 100644
index 0000000..5aeb117
--- /dev/null
+++ b/bootstrap-win/neovim-dict.ps1
@@ -0,0 +1,58 @@
1#Requires -Version 5.1
2<#
3 Windows-natives Pendant zu bootstrap/neovim-dict.sh.
4 Laedt die deutschen Rechtschreib-Woerterbuecher fuer Neovim herunter.
5
6 Aufruf:
7 .\bootstrap-win\neovim-dict.ps1
8#>
9
10$ErrorActionPreference = "Stop"
11
12function Write-Ok($msg) {
13 Write-Host "OK $msg" -ForegroundColor Green
14}
15
16function Write-Step($msg) {
17 Write-Host "==> $msg" -ForegroundColor Cyan
18}
19
20function Write-SkipMsg($msg) {
21 Write-Host "- $msg bereits vorhanden" -ForegroundColor DarkGray
22}
23
24$SpellDir = Join-Path $env:LOCALAPPDATA "nvim-data\site\spell"
25
26$Urls = @(
27 "https://ftp.nluug.nl/pub/vim/runtime/spell/de.utf-8.spl",
28 "https://ftp.nluug.nl/pub/vim/runtime/spell/de.utf-8.sug"
29)
30
31function Get-SpellFile([string]$Url) {
32 $fileName = Split-Path -Leaf $Url
33 $dest = Join-Path $SpellDir $fileName
34
35 if (Test-Path $dest) {
36 Write-SkipMsg $fileName
37 return
38 }
39
40 Write-Step "Lade $fileName herunter"
41 Invoke-WebRequest -Uri $Url -OutFile $dest
42 Write-Ok $fileName
43}
44
45function Main {
46 if (-not (Test-Path $SpellDir)) {
47 New-Item -ItemType Directory -Path $SpellDir -Force | Out-Null
48 }
49
50 foreach ($url in $Urls) {
51 Get-SpellFile $url
52 }
53
54 Write-Host ""
55 Write-Host "Woerterbuecher fuer Neovim installiert!" -ForegroundColor Green
56}
57
58Main