diff options
| author | srdusr <trevorgray@srdusr.com> | 2023-10-22 22:50:02 +0200 |
|---|---|---|
| committer | srdusr <trevorgray@srdusr.com> | 2023-10-22 22:50:02 +0200 |
| commit | a4f18086ba7ce108ebb041b9b0c52bf522413000 (patch) | |
| tree | 8d63a98b329f4af486f38db47d0b6049c6e441d8 /.scripts/win-nvim.bat | |
| parent | bf45ef759815ad7ac3f6423114a96f4d56d1a2a2 (diff) | |
| parent | 68a2612c8b737f6770a4d23848fe6409ddce7888 (diff) | |
| download | dotfiles-a4f18086ba7ce108ebb041b9b0c52bf522413000.tar.gz dotfiles-a4f18086ba7ce108ebb041b9b0c52bf522413000.zip | |
Add '.scripts/' from commit 'a4ba0376ba73b1bb295d8bb459a4bf2b063ddca9'
git-subtree-dir: .scripts
git-subtree-mainline: 03c0cf66468d5e04c0e3559f9f89b5eec28feb9e
git-subtree-split: a4ba0376ba73b1bb295d8bb459a4bf2b063ddca9
Diffstat (limited to '.scripts/win-nvim.bat')
| -rw-r--r-- | .scripts/win-nvim.bat | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/.scripts/win-nvim.bat b/.scripts/win-nvim.bat new file mode 100644 index 0000000..c99374d --- /dev/null +++ b/.scripts/win-nvim.bat @@ -0,0 +1,37 @@ +@echo off + +REM Install NeoVim with winget, if not already present on the system +where nvim >nul 2>nul +if %errorlevel% neq 0 ( + winget install Neovim.Neovim -q +) + +REM Clone my dotfiles repo +set dotFilesRoot=%USERPROFILE%\dotfiles +if not exist "%dotFilesRoot%\." ( + git clone git@github.com:srdusr/dotfiles.git "%dotFilesRoot%" +) + +REM Link NeoVim configuration +set localConfiguration=%LOCALAPPDATA%\nvim +set dotfilesConfiguration=%dotFilesRoot%\.config\nvim + +if not exist "%localConfiguration%\." ( + mklink /D "%localConfiguration%" "%dotfilesConfiguration%" +) + +REM Clone Packer.nvim, if not already present on the system +set localPacker=%LOCALAPPDATA%\nvim-data\site\pack\packer\start\packer.nvim + +if not exist "%localPacker%\." ( + git clone https://github.com/wbthomason/packer.nvim "%localPacker%" +) + +REM Run the script by using this command in the same existing directory: win-nvim.bat + +@powershell -NoProfile -ExecutionPolicy Bypass -Command "iex ((new-object net.webclient).DownloadString('https://aka.ms/install-winget'))" +iex ((new-object net.webclient).DownloadString('https://aka.ms/install-winget')) +curl -o winget-cli.appxbundle https://aka.ms/winget-cli-appxbundle + +powershell Add-AppxPackage -Path "winget-cli.appxbundle" + |
