summaryrefslogtreecommitdiffstats
path: root/.config/nvim
diff options
context:
space:
mode:
Diffstat (limited to '.config/nvim')
-rw-r--r--.config/nvim/init.vim6
-rw-r--r--.config/nvim/plug.vim2
2 files changed, 7 insertions, 1 deletions
diff --git a/.config/nvim/init.vim b/.config/nvim/init.vim
index a9f2d7f..cab9636 100644
--- a/.config/nvim/init.vim
+++ b/.config/nvim/init.vim
@@ -8,6 +8,12 @@
set runtimepath^=/home/jozan/.config/nvim runtimepath+=/home/jozan/.config/nvim/after
let &packpath = &runtimepath
+if ! filereadable(system('echo -n "$XDG_DATA_HOME/nvim/autoload/plug.vim"'))
+ echo "Downloading junegunn/vim-plug to manage plugins..."
+ silent !mkdir -p $XDG_DATA_HOME/nvim/autoload/
+ silent !curl "https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim" > $XDG_DATA_HOME/nvim/autoload/plug.vim
+ autocmd VimEnter * PlugInstall
+endif
source /home/jozan/.config/nvim/plug.vim
source /home/jozan/.config/nvim/settings.vim
source /home/jozan/.config/nvim/bindings.vim
diff --git a/.config/nvim/plug.vim b/.config/nvim/plug.vim
index db435c5..694fa48 100644
--- a/.config/nvim/plug.vim
+++ b/.config/nvim/plug.vim
@@ -1,4 +1,4 @@
-call plug#begin('~/.vim/plugged')
+call plug#begin(system('echo -n "$XDG_DATA_HOME/nvim/plugged"'))
Plug 'brglng/vim-sidebar-manager'
Plug 'dag/vim-fish'
Plug 'honza/vim-snippets'