guix/gnu/packages/aux-files/guix-nvim.vim
Oscar Chevalier 2738209b5d
gnu: neovim: Add support for guix neovim packages.
Enables the use of guix as a package manager for neovim, compatible with
the outputs of `vim-build-system`.

* gnu/packages/vim.scm (neovim)[arguments]: Added another phase to
install the system init file to the correct place.
* gnu/packages/aux-files/guix-nvim.vim: New file.
* Makefile.am (AUX_FILES): Register file.

Change-Id: I375e3e0d051da27d065dff5456cb298a01bc90b1
Signed-off-by: Efraim Flashner <efraim@flashner.co.il>
2025-09-25 12:38:47 +03:00

10 lines
427 B
VimL

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