aboutsummaryrefslogtreecommitdiff
path: root/win-nvim.bat
blob: 3439ffbf857e1a5639ae71f13137db6af6fdbd1b (plain)
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
@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