diff options
| author | srdusr <trevorgray@srdusr.com> | 2023-07-14 19:52:57 +0200 |
|---|---|---|
| committer | srdusr <trevorgray@srdusr.com> | 2023-07-14 19:52:57 +0200 |
| commit | 4de87c9813be65b096db5962101e2d4f4f310dde (patch) | |
| tree | f2922147c505af4b8d747ddabc937062d3868faa | |
| parent | ee5a4e281ad7bca6ba581bf4fdbe542b6f62c0ab (diff) | |
| download | dotfiles-4de87c9813be65b096db5962101e2d4f4f310dde.tar.gz dotfiles-4de87c9813be65b096db5962101e2d4f4f310dde.zip | |
Install nvim in Windows (bat/cmd)
| -rw-r--r-- | win-nvim.bat | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/win-nvim.bat b/win-nvim.bat new file mode 100644 index 0000000..3439ffb --- /dev/null +++ b/win-nvim.bat @@ -0,0 +1,31 @@ +@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 + |
