diff options
| author | srdusr <trevorgray@srdusr.com> | 2023-08-06 23:01:08 +0200 |
|---|---|---|
| committer | srdusr <trevorgray@srdusr.com> | 2023-08-06 23:01:08 +0200 |
| commit | 4dfe75ca5ed81a15db036a294fe2a36243413e19 (patch) | |
| tree | bdd5acbec857240e352f04510e1260ab2c9994f3 /.local/bin/scripts/win-nvim.bat | |
| parent | 7b13d618f5a90deb36367480ed4c70876fa41095 (diff) | |
| parent | 692db3d7b9b80c1849b283738f6a2fe61ea0cdd2 (diff) | |
| download | dotfiles-4dfe75ca5ed81a15db036a294fe2a36243413e19.tar.gz dotfiles-4dfe75ca5ed81a15db036a294fe2a36243413e19.zip | |
Merge commit '7f5e37f9dc4f834aecdc3f76652d79c0a1d842b0'
Diffstat (limited to '.local/bin/scripts/win-nvim.bat')
| -rw-r--r-- | .local/bin/scripts/win-nvim.bat | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/.local/bin/scripts/win-nvim.bat b/.local/bin/scripts/win-nvim.bat new file mode 100644 index 0000000..c99374d --- /dev/null +++ b/.local/bin/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" + |
