-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsetup.ps1
More file actions
161 lines (143 loc) · 7.02 KB
/
Copy pathsetup.ps1
File metadata and controls
161 lines (143 loc) · 7.02 KB
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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
# Add symbolik link for init.vim for NeoVim
New-Item -Path $env:LOCALAPPDATA\ -Name nvim -ItemType SymbolicLink -Value ${PWD}\NeoVim\ -Force
# Add symbolic link PowerShell profile
# Make sure that the $PROFILE isn't pointing to OneDrive. If it does, change the location of the Documents folder
# Make sure to run it in the correct version of PowerShell. The $PROFILE is can be defferent between version, 5 vs 7
New-Item -Path (Split-Path $PROFILE.CurrentUserAllHosts) -Name (Split-Path $PROFILE.CurrentUserAllHosts -Leaf) `
-ItemType SymbolicLink -Value ${PWD}\WindowsTerminal\powershell_profile.ps1 -Force
# Install vim-plug
# Invoke-WebRequest -useb https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim |`
# New-Item "$(@($env:XDG_DATA_HOME, $env:LOCALAPPDATA)[$null -eq $env:XDG_DATA_HOME])/nvim-data/site/autoload/plug.vim" -Force
# Add SymbolicLink to settings.json for Windows Terminal
New-Item -Path $env:LOCALAPPDATA\Packages\Microsoft.WindowsTerminal_8wekyb3d8bbwe\LocalState\ -Name settings.json `
-Value ${PWD}\WindowsTerminal\settings.json -ItemType SymbolicLink -Force
# Add Symbolic Link to the Alacritty config
New-Item -Path $env:APPDATA\ -Name .\alacritty -Value ${PWD}\Alacritty\ `
-ItemType SymbolicLink -Force
# Add Symbolic Link to the Wezterm config
New-Item -Path $HOME\.config\wezterm -Name .\wezterm.lua -Value ${PWD}\wezterm\.wezterm.lua `
-ItemType SymbolicLink -Force
# Add Symbolic Link to the Rio terminal config
New-Item -Path $env:LOCALAPPDATA\ -Name rio -Target $PWD\rio\.config\rio -ItemType SymbolicLink -Force
# Add Symbolic Link to the config for starship
New-Item -Path $HOME\.config\ -Name starship.toml -Target $PWD\starship\.config\starship.toml -ItemType SymbolicLink -Force
# Add Symbolic Link to the config for git
New-Item -Path $HOME\.config\ -Name git -Target $PWD\git\.config\git -ItemType SymbolicLink -Force
Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope CurrentUser
Invoke-RestMethod -Uri https://get.scoop.sh | Invoke-Expression
scoop bucket add extras
scoop bucket add versions
scoop bucket add sysinternals
scoop install `
git `
gh `
unzip `
7zip `
jq `
jid `
ripgrep `
fzf `
fd `
eza `
bat `
less `
tre `
bottom `
gsudo `
curl `
openssh `
# openvpn `
gpg4win `
putty `
zoxide `
oh-my-posh `
starship `
cmake `
ninja `
llvm `
nasm `
perl `
flatc `
rustup `
go `
nodejs `
yarn ` # Usesed by iamcco/markdown-preview.nvim
octave `
lua-language-server `
pwsh `
nu `
# extras/wezterm ` # I checked v20240203-110809-5046fc22, undercurl doesn't work in NeoVim, so using nightly
versions/wezterm-nightly `
alacritty `
rio `
windows-terminal `
vim `
neovim `
win32yank ` # Used by NeoVim as clippboard when in WSL so it can be shared with Windows
# versions/neovim-nightly `
neovide `
helix `
notepadplusplus `
dbeaver `
imhex `
process-explorer `
harper `
# powertoys `
# nmap `
# ffmpeg `
# draw.io `
# slack `
# setup git
# TODO this should be in the config files
git config --global user.email "drllap@gmail.com"
git config --global user.name "Pall Palsson"
git config --global core.editor "nvim" # Use NeoVim as git editor
git config --global core.symlink true
git config --global core.sshCommand "C:/Windows/System32/OpenSSH/ssh.exe"
git config --global pull.rebase true
git config --global pull.autoSetupRemote true
git config --global rebase.autoStash true
git config --global rebase.updateRefs true
git config --global merge.autoStash true
# Update PowerShellGet and Dependences (PackageManagement)
Install-Module -Name PowerShellGet -Scope CurrentUser -Force -AllowClobber
# Update PSReadLine,
# -Force needed because older version is built in
Install-Module PSReadLine -Force
# Install-Module -Name PSFzf -Scope CurrentUser # Wrapper for fzf
# Install-Module -Name npm-completion -Scope CurrentUser # Tab autocompletion for nodes npm
Install-Module -Name posh-git -Scope CurrentUser # Git tab autocompletion
# Install-Module -Name PowerColorLS -Scope CurrentUser # Better (colorfull) ls/dir command
# Install-Module -Name Terminal-Icons -Scope CurrentUser # Dependency of PowerColorLS
# Install-Module -Name z -Scope CurrentUser -AllowClobber # Navigation module for PowerShell, similar to autojump
# Install-Module -Name DockerCompletion -Scope CurrentUser # Add tab Autocompletion for docker
# Download and install PowerShell LSP Server into ../LSP-Servers
mkdir ../LSP-Servers
Invoke-WebRequest `
https://github.com/PowerShell/PowerShellEditorServices/releases/download/v2.5.2/PowerShellEditorServices.zip `
-OutFile PowerShellEditorServices.zip
Expand-Archive PowerShellEditorServices.zip -DestinationPath "../LSP-Servers/PowerShellEditorServices"
Remove-Item PowerShellEditorServices.zip
# # Download and Install lua-language-server (sumneko_lua) into ../LSP-Servers # We can install this via scoop
# git clone https://github.com/sumneko/lua-language-server ../LSP-Servers/lua-language-server
# Push-Location ../LSP-Servers/lua-language-server/
# git submodule update --init --recursive
# Set-Location 3rd/luamake
# compile/install.bat
# Set-Location ../..
# 3rd/luamake/luamake.exe rebuild
# Pop-Location
# Install pyright, python LSP server, requires NodeJS
# npm install -g pyright # Install pyrigh with pip instead
npm install -g `
vim-language-server `
bash-language-server `
yaml-language-server ` # LSP server for yaml
@vlabo/cspell-lsp ` # LSP for spell spell checking using CSpell
pip3 install `
neovim `
pywin32 `
pyright `
cmake-language-server `
conan `
pyreadline # Needed for tab autocompletion in python shell