From 00f6823191352a12913666743bf1a46132a30d34 Mon Sep 17 00:00:00 2001 From: Gal Szkolnik Date: Mon, 23 May 2022 02:02:03 -0400 Subject: [PATCH] Added vim/nvim pluggin support --- _home/private_dot_config/nvim/init.vim | 18 ++++++++++++++++++ .../private_share/private_fonts/.keep | 0 _home/symlink_dot_vimrc.tmpl | 1 + 3 files changed, 19 insertions(+) create mode 100644 _home/private_dot_config/nvim/init.vim create mode 100644 _home/private_dot_local/private_share/private_fonts/.keep create mode 100644 _home/symlink_dot_vimrc.tmpl diff --git a/_home/private_dot_config/nvim/init.vim b/_home/private_dot_config/nvim/init.vim new file mode 100644 index 0000000..98efb0f --- /dev/null +++ b/_home/private_dot_config/nvim/init.vim @@ -0,0 +1,18 @@ +" Install vim-plug if not found +let data_dir = has('nvim') ? stdpath('data') . '/site' : '~/.vim' +if empty(glob(data_dir . '/autoload/plug.vim')) + silent execute '!curl -fLo '.data_dir.'/autoload/plug.vim --create-dirs https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim' + autocmd VimEnter * PlugInstall --sync | source $MYVIMRC +endif + +" Run PlugInstall if there are missing plugins +autocmd VimEnter * if len(filter(values(g:plugs), '!isdirectory(v:val.dir)')) | PlugInstall --sync | source $MYVIMRC | endif + +" Plugins will be downloaded under the specified directory. +call plug#begin(has('nvim') ? stdpath('data') . '/plugged' : '~/.vim/plugged') + +" Declare the list of plugins. +Plug 'tpope/vim-sensible' +Plug 'junegunn/seoul256.vim' + +call plug#end() diff --git a/_home/private_dot_local/private_share/private_fonts/.keep b/_home/private_dot_local/private_share/private_fonts/.keep new file mode 100644 index 0000000..e69de29 diff --git a/_home/symlink_dot_vimrc.tmpl b/_home/symlink_dot_vimrc.tmpl new file mode 100644 index 0000000..34cd295 --- /dev/null +++ b/_home/symlink_dot_vimrc.tmpl @@ -0,0 +1 @@ +{{ .chezmoi.homeDir }}/.config/nvim/init.vim