From e82917918fb5d7437a60d6a6832c3583235a3d80 Mon Sep 17 00:00:00 2001 From: Danielle McLean Date: Sat, 4 Nov 2023 13:44:52 +1100 Subject: [PATCH] Always load Editorconfig the same way :) --- dot-config/vim/init.vim | 4 +++- dot-config/vim/plugins.vim | 5 ++++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/dot-config/vim/init.vim b/dot-config/vim/init.vim index d0fdc6a..d400502 100644 --- a/dot-config/vim/init.vim +++ b/dot-config/vim/init.vim @@ -44,7 +44,9 @@ inoremap jj # tools my beloved nnoremap :Files -silent! packadd! editorconfig +# We will always have Editorconfig available as an optional package, either +# because it was bundled with Vim or because Minpac installed it that way. +packadd! editorconfig set belloff+=ctrlg diff --git a/dot-config/vim/plugins.vim b/dot-config/vim/plugins.vim index 25e8f2d..521f94e 100644 --- a/dot-config/vim/plugins.vim +++ b/dot-config/vim/plugins.vim @@ -16,8 +16,11 @@ minpac#add('prabirshrestha/async.vim') minpac#add('lifepillar/vim-gruvbox8') +# If this Vim doesn't already provide Editorconfig as part of its runtime, +# install it ourselves, using exactly the same package name and type (opt, so +# that it can be loaded with :packadd). if !isdirectory($VIMRUNTIME .. '/pack/dist/opt/editorconfig') - minpac#add('editorconfig/editorconfig-vim') + minpac#add('editorconfig/editorconfig-vim', {name: 'editorconfig', type: 'opt'}) endif minpac#add('direnv/direnv.vim')