-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsetup.ps1
89 lines (73 loc) · 4.11 KB
/
setup.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
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
# Add symbolik link for init.vim for NeoVim
New-Item -Path $env:LOCALAPPDATA\ -Name nvim -ItemType SymbolicLink -Value .\NeoVim\ -Force
# Add symbolic link PowerShell profile
New-Item -Path (Split-Path $PROFILE.CurrentUserAllHosts) -Name (Split-Path $PROFILE.CurrentUserAllHosts -Leaf) `
-ItemType SymbolicLink -Value ${PWD}\WindowsTerminal\powershell_profile.ps1 -Force
# Add symbolic link PowerShell profile for PS7. The above is for PS5
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 .\WindowsTerminal\settings.json -ItemType SymbolicLink -Force
# Add Symbolic Link to the Alacritty config
New-Item -Path $env:APPDATA\ -Name .\alacritty -Value .\Alacritty\ `
-ItemType SymbolicLink -Force
# Add Symbolic Link to the Wezterm config
New-Item -Path $HOME\.config\wezterm -Name .\wezterm.lua -Value .\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
# setup git
git config --global user.email "[email protected]"
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 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
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 `
yarn # Usesed by iamcco/markdown-preview.nvim
pip3 install `
neovim `
pywin32 `
pyright `
cmake-language-server `
conan `
pyreadline # Needed for tab autocompletion in python shell