diff options
| author | jdhao <jdhao@hotmail.com> | 2022-08-19 20:05:40 +0800 |
|---|---|---|
| committer | jdhao <jdhao@hotmail.com> | 2022-08-19 20:05:40 +0800 |
| commit | e68c687f23c963a0172cee78ccfdeae06b1e1555 (patch) | |
| tree | 52b09a01b3fb86d4b4be59b8f70c7d707dbef269 /docs/nvim_setup_windows.ps1 | |
| parent | 497f93d6c71b01803e818827836b917e2029f5b8 (diff) | |
update install script for Windows
Diffstat (limited to 'docs/nvim_setup_windows.ps1')
| -rw-r--r-- | docs/nvim_setup_windows.ps1 | 29 |
1 files changed, 26 insertions, 3 deletions
diff --git a/docs/nvim_setup_windows.ps1 b/docs/nvim_setup_windows.ps1 index 7a25c10..c88aba9 100644 --- a/docs/nvim_setup_windows.ps1 +++ b/docs/nvim_setup_windows.ps1 @@ -1,6 +1,8 @@ -# Install scoop +# Set policy to avoid errors Set-ExecutionPolicy RemoteSigned -scope CurrentUser -iwr -useb get.scoop.sh | iex + +# Install scoop +Invoke-WebRequest -UseBasicParsing get.scoop.sh | Invoke-Expression # Install node scoop install nodejs @@ -18,7 +20,7 @@ npm install -g vim-language-server # Install bash-language-server npm install -g bash-language-server -# Install miniconda3 +# Install miniconda3 (for Python) scoop install miniconda3 # Install pynvim @@ -27,6 +29,27 @@ pip install -U pynvim # Install python-language-server pip install 'python-lsp-server[all]' pylsp-mypy pyls-isort +# Install visual c++ redistribution +scoop install vcredist2022 + +# Install 7zip +scoop install 7zip + +# Install lua-language-server +$sumneko_lua_link = "https://github.com/sumneko/lua-language-server/releases/download/3.5.3/lua-language-server-3.5.3-win32-x64.zip" +$sumneko_lua_install_dir = "D:\portable_tools" +$sumneko_lua_src_dir = "$sumneko_lua_install_dir\lua-language-server.zip" +$sumneko_lua_dir = "$sumneko_lua_install_dir\lua-language-server" + +# Download file, ref: https://stackoverflow.com/a/51225744/6064933 +Invoke-WebRequest $sumneko_lua_link -OutFile "$sumneko_lua_src_dir" + +# Extract the zip file using 7zip, ref: https://stackoverflow.com/a/41933215/6064933 +7z x "$sumneko_lua_src_dir" -o"$sumneko_lua_dir" + +# Setup PATH env variable, ref: https://stackoverflow.com/q/714877/6064933 +[Environment]::SetEnvironmentVariable("Path", $env:Path + ";$sumneko_lua_dir\bin", "Machine") + # Install neovim nightly scoop bucket add versions scoop install neovim |
