diff --git a/bin/install.ps1 b/bin/install.ps1 index d249c85..bbd0bfb 100644 --- a/bin/install.ps1 +++ b/bin/install.ps1 @@ -16,4 +16,19 @@ if ($PSVersionTable.PSVersion.Major -lt 7) { please install powershell 7 (Core) you can install via winget" exit 1 -} \ No newline at end of file +} + +# check working directory +if (!( + (Test-Path bin) -and (Test-Path dotfiles) + )) { + Write-Warning -Message "wrong current path + please execute at repo root" + exit 1 +} + + +# make symbolic links +# neovim +$neovim_directory +New-Item -ItemType SymbolicLink -Path ~\AppData\Local\nvim\init.vim -Target (Resolve-Path .\dotfiles\neovim\init.vim) -Force \ No newline at end of file diff --git a/dotfiles/neovim/init.vim b/dotfiles/neovim/init.vim new file mode 100644 index 0000000..3f1525c --- /dev/null +++ b/dotfiles/neovim/init.vim @@ -0,0 +1,16 @@ +set number +set relativenumber +set tabstop=4 +set shiftwidth=4 +set autoindent +set mouse=a +colorscheme default + +if has('win32') + let &shell = executable('pwsh') ? 'pwsh' : 'powershell' + let &shellcmdflag = '-NoLogo -NoProfile -ExecutionPolicy RemoteSigned -Command [Console]::InputEncoding=[Console]::OutputEncoding=[System.Text.Encoding]::UTF8;' + let &shellredir = '-RedirectStandardOutput %s -NoNewWindow -Wait' + let &shellpipe = '2>&1 | Out-File -Encoding UTF8 %s; exit $LastExitCode' + set shellquote= shellxquote= + +endif \ No newline at end of file