0
0
Fork 0
mirror of https://github.com/NixOS/nixpkgs.git synced 2025-07-14 06:00:33 +03:00

vimPlugins.rocks-nvim: add initLua for a working out of the box exper… (#375083)

vimPlugins.rocks-nvim: add initLua for a working out of the box experience

added a test as well. Using NVIM_APPNAME to run "neovim.tests.nvim_with_rocks_nvim" in a minimal sandbox.
This commit is contained in:
Matthieu Coudron 2025-02-10 17:41:54 +01:00 committed by GitHub
parent dffcaa4da0
commit f7408d3148
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 29 additions and 1 deletions

View file

@ -103,6 +103,13 @@ let
${pkgs.perl}/bin/perl -pe "s|\Q$NIX_STORE\E/[a-z0-9]{32}-|$NIX_STORE/eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee-|g" < "$luarc" > "$luarcGeneric"
'' + buildCommand);
nvim_with_rocks_nvim = (
wrapNeovimUnstable neovim-unwrapped {
extraName = "with-rocks-nvim";
wrapperArgs = "--set NVIM_APPNAME test-rocks-nvim";
plugins = [ vimPlugins.rocks-nvim ];
}
);
in
pkgs.recurseIntoAttrs (rec {
@ -367,5 +374,10 @@ in
${nvim-with-luasnip}/bin/nvim -i NONE --cmd "lua require'jsregexp'" -e +quitall!
'';
inherit nvim_with_rocks_nvim;
rocks_install_plenary = runTest nvim_with_rocks_nvim ''
${nvim_with_rocks_nvim}/bin/nvim -V3log.txt -i NONE +'Rocks install plenary.nvim' +quit! -e
'';
inherit (vimPlugins) corePlugins;
})

View file

@ -4019,7 +4019,6 @@ in
"papis-nvim"
"rest-nvim"
"rocks-config-nvim"
"rocks-nvim"
"rtp-nvim"
"telescope-manix"
"telescope-nvim"
@ -4032,3 +4031,20 @@ in
in
lib.genAttrs luarocksPackageNames toVimPackage
)
// {
rocks-nvim =
(neovimUtils.buildNeovimPlugin {
luaAttr = luaPackages.rocks-nvim;
}).overrideAttrs
(oa: {
passthru = oa.passthru // {
initLua = ''
vim.g.rocks_nvim = {
luarocks_binary = "${neovim-unwrapped.lua.pkgs.luarocks_bootstrap}/bin/luarocks"
}
'';
};
});
}