mirror of
https://git.in.rschanz.org/ryan77627/guix.git
synced 2024-11-07 07:26:13 -05:00
gnu: vim: Automatically find vim plugins.
* gnu/packages/vim.scm (vim)[arguments]: Add new 'install-guix.vim phase to install vendor specific vimrc. * gnu/packages/aux-files/guix.vim: New file. * Makefile.am (AUX_FILES): Register it.
This commit is contained in:
parent
caee6ec7c8
commit
53b51b44fd
3 changed files with 17 additions and 1 deletions
|
@ -356,6 +356,7 @@ dist_noinst_DATA = \
|
|||
AUX_FILES = \
|
||||
gnu/packages/aux-files/chromium/master-preferences.json \
|
||||
gnu/packages/aux-files/emacs/guix-emacs.el \
|
||||
gnu/packages/aux-files/guix.vim \
|
||||
gnu/packages/aux-files/linux-libre/5.10-arm.conf \
|
||||
gnu/packages/aux-files/linux-libre/5.10-arm64.conf \
|
||||
gnu/packages/aux-files/linux-libre/5.10-i686.conf \
|
||||
|
|
7
gnu/packages/aux-files/guix.vim
Normal file
7
gnu/packages/aux-files/guix.vim
Normal file
|
@ -0,0 +1,7 @@
|
|||
" 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]
|
||||
let vimplugins = directory . "/share/vim/vimfiles"
|
||||
if isdirectory(vimplugins)
|
||||
let &rtp = join([&rtp,vimplugins], ',')
|
||||
endif
|
||||
endfor
|
|
@ -145,7 +145,14 @@ (define-public vim
|
|||
;; Blindly fix some other differences based on error output.
|
||||
(("^\\|!") "|<")
|
||||
(("@37") "")))
|
||||
#t)))))
|
||||
#t))
|
||||
(add-after 'install 'install-guix.vim
|
||||
(lambda* (#:key inputs outputs #:allow-other-keys)
|
||||
(let ((vimdir (string-append (assoc-ref outputs "out") "/share/vim")))
|
||||
(mkdir-p vimdir)
|
||||
(copy-file (assoc-ref inputs "guix.vim")
|
||||
(string-append vimdir "/vimrc"))
|
||||
#t))))))
|
||||
(inputs
|
||||
`(("gawk" ,gawk)
|
||||
("ncurses" ,ncurses)
|
||||
|
@ -153,6 +160,7 @@ (define-public vim
|
|||
("tcsh" ,tcsh))) ; For runtime/tools/vim32
|
||||
(native-inputs
|
||||
`(("libtool" ,libtool)
|
||||
("guix.vim" ,(search-auxiliary-file "guix.vim"))
|
||||
|
||||
;; For tests.
|
||||
("tzdata" ,tzdata-for-tests)))
|
||||
|
|
Loading…
Reference in a new issue