From 25fc2a381fb65157e81d0dce74fb0e7de7f8afa1 Mon Sep 17 00:00:00 2001 From: tsxv478 Date: Sun, 28 Apr 2024 21:03:20 +0300 Subject: Fix vim-plug installation --- nvim/init.vim | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/nvim/init.vim b/nvim/init.vim index b2f69f1..42e76be 100644 --- a/nvim/init.vim +++ b/nvim/init.vim @@ -1,9 +1,10 @@ let mapleader="," -if empty(glob('~/.local/share/nvim/site/autoload/plug.vim')) - silent !curl -fLo ~/.local/share/nvim/site/autoload/plug.vim --create-dirs - \ https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim - autocmd VimEnter * PlugInstall --sync +if ! filereadable(system('echo -n "${XDG_CONFIG_HOME:-$HOME/.config}/nvim/autoload/plug.vim"')) + echo "Downloading junegunn/vim-plug to manage plugins..." + silent !mkdir -p ${XDG_CONFIG_HOME:-$HOME/.config}/nvim/autoload/ + silent !curl "https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim" > ${XDG_CONFIG_HOME:-$HOME/.config}/nvim/autoload/plug.vim + autocmd VimEnter * PlugInstall endif call plug#begin() -- cgit v1.2.3