M Makefile.am => Makefile.am +1 -0
@@ 448,6 448,7 @@ AUX_FILES = \
gnu/packages/aux-files/emacs/guix-emacs.el \
gnu/packages/aux-files/findclass.php \
gnu/packages/aux-files/guix.vim \
+ gnu/packages/aux-files/guix-nvim.vim \
gnu/packages/aux-files/linux-libre/6.16-arm64.conf \
gnu/packages/aux-files/linux-libre/6.16-riscv.conf \
gnu/packages/aux-files/linux-libre/6.16-x86_64.conf \
A gnu/packages/aux-files/guix-nvim.vim => gnu/packages/aux-files/guix-nvim.vim +10 -0
@@ 0,0 1,10 @@
+lua << EOF
+ -- This appends all applicable neovim paths to the runtimepath.
+ for _, directory in pairs({"/run/current-system/profile", "~/.guix-profile", "~/.guix-home/profile", vim.env.GUIX_PROFILE, vim.env.GUIX_ENVIRONMENT}) do
+ local rtp = vim.fs.abspath(directory .. "/share/nvim/site")
+ local stat = vim.uv.fs_stat(rtp)
+ if stat and stat.type == "directory" then
+ vim.opt.rtp:append(rtp)
+ end
+ end
+EOF
M gnu/packages/vim.scm => gnu/packages/vim.scm +9 -1
@@ 862,7 862,15 @@ is based on Vim's builtin plugin support.")
;; doubles its size. We remove the reference here.
(substitute* "cmake.config/versiondef.h.in"
(("\\$\\{CMAKE_C_COMPILER\\}") "/gnu/store/.../bin/gcc"))
- #t)))))
+ #t))
+ (add-after 'install 'install-guix-nvim.vim
+ (lambda* (#:key outputs #:allow-other-keys)
+ (let ((nvimdir (string-append (assoc-ref outputs "out")
+ "/share/nvim")))
+ (mkdir-p nvimdir)
+ (copy-file
+ #$(local-file (search-auxiliary-file "guix-nvim.vim"))
+ (string-append nvimdir "/sysinit.vim"))))))))
(inputs (list libuv-for-luv
msgpack
libtermkey