gnu: vim: Adjust autodetected plugin directories.

* gnu/packages/aux-files/guix.vim: Autodetect plugins installed with
guix-home. Add */after directories at the end of the runtimepath.
This commit is contained in:
Efraim Flashner 2022-02-16 09:57:40 +02:00
parent 52269e27c6
commit e358706058
No known key found for this signature in database
GPG key ID: 41AAE7DCCA3D8351

View file

@ -1,7 +1,13 @@
" This appends all of the vim plugins to the end of Vim's runtimepath.
for directory in ["/run/current-system/profile", $HOME . "/.guix-profile", $GUIX_PROFILE, $GUIX_ENVIRONMENT]
for directory in ["/run/current-system/profile", $HOME . "/.guix-profile", $HOME ."/.guix-home/profile", $GUIX_PROFILE, $GUIX_ENVIRONMENT]
let vimplugins = directory . "/share/vim/vimfiles"
if isdirectory(vimplugins)
let &rtp = join([&rtp,vimplugins], ',')
endif
endfor
" Unconditionally add */after directories last, as intended by upstream
" TODO: Remove duplicate */after directories
for directory in [$VIM . "/vimfiles", $HOME ."/.vim"]
let vimplugins = directory . "/after"
let &rtp = join([&rtp,vimplugins], ',')
endfor