forked from ChrisTitusTech/neovim
-
Notifications
You must be signed in to change notification settings - Fork 0
/
winsetup.ps1
48 lines (44 loc) · 2 KB
/
winsetup.ps1
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
# Initial Setup file for new systems
rm -r ~/AppData/Local/nvim
rm -r ~/AppData/Local/nvim-data
mkdir -p $HOME/.vim/undodir
mkdir -p $HOME/.scripts
irm "https://osdn.net/frs/redir.php?m=rwthaachen&f=mingw%2F68260%2Fmingw-get-setup.exe" -o "mingw-setup.exe"
# Share system clipboard with unnamedplus
#sudo apt install vim-gtk3 ripgrep fd-find xclip neovim python3-venv luarocks go luarocks go
New-Item -Path "$HOME\AppData\Local\nvim" -ItemType SymbolicLink -Target "$pwd\custom"
# Grab dependencies
# Install Choco
Set-ExecutionPolicy Bypass -Scope Process -Force; [System.Net.ServicePointManager]::SecurityProtocol = [System.Net.ServicePointManager]::SecurityProtocol -bor 3072; iex ((New-Object System.Net.WebClient).DownloadString('https://community.chocolatey.org/install.ps1'))
#Vale Setup
choco install vale
Copy-Item ".vale.ini" -Destination $HOME
C:\ProgramData\chocolatey\bin\vale.exe sync
# Winget Programs
$wingetinstall = New-Object System.Collections.Generic.List[System.Object]
$wingetinstall.Add("rjpcomputing.luaforwindows")
$wingetinstall.Add("Python.Python.3")
$wingetinstall.Add("Rustlang.Rust.MSVC")
$wingetinstall.Add("OpenJS.NodeJS")
$wingetinstall.Add("Neovim.Neovim")
#$wingetinstall.Add("")
#$wingetinstall.Add("")
#$wingetinstall.Add("")
#$wingetinstall.Add("")
#$wingetinstall.Add("")
# Install all winget programs in new window
$wingetinstall.ToArray()
# Define Output variable
foreach ( $node in $wingetinstall ) {
try {
Start-Process powershell.exe -Verb RunAs -ArgumentList "-command winget install -e --accept-source-agreements --accept-package-agreements --silent $node | Out-Host" -WindowStyle Normal
Start-Sleep -s 3
Wait-Process winget -Timeout 90 -ErrorAction SilentlyContinue
}
catch [System.InvalidOperationException] {
Write-Warning "Allow Yes on User Access Control to Install"
}
catch {
Write-Error $_.Exception
}
}