neovim.tests: complete plug test

to check that it can correctly load the colorscheme
This commit is contained in:
Matthieu Coudron 2021-09-14 21:49:16 +02:00
parent 47eaf6727b
commit 761b2c6ff3
3 changed files with 12 additions and 3 deletions

@ -87,10 +87,19 @@ rec {
nvim_with_plug = neovim.override {
extraName = "-with-plug";
configure.plug.plugins = with pkgs.vimPlugins; [
vim-go
base16-vim
];
configure.customRC = ''
color base16-tomorrow-night
set background=dark
'';
};
run_nvim_with_plug = runTest nvim_with_plug ''
export HOME=$TMPDIR
${nvim_with_plug}/bin/nvim -i NONE -c 'color base16-tomorrow-night' +quit!
'';
# nixpkgs should detect that no wrapping is necessary
nvimShouldntWrap = wrapNeovim2 "-should-not-wrap" nvimAutoDisableWrap;

@ -6,7 +6,7 @@
rec {
addRtp = path: attrs: derivation:
derivation // { rtp = "${derivation}/${path}"; } // {
derivation // { rtp = "${derivation}"; } // {
overrideAttrs = f: buildVimPlugin (attrs // f attrs);
};

@ -295,7 +295,7 @@ let
plugImpl =
(''
source ${vimPlugins.vim-plug.rtp}/plug.vim
call plug#begin('/dev/null')
silent! call plug#begin('/dev/null')
'' + (lib.concatMapStringsSep "\n" (pkg: "Plug '${pkg.rtp}'") plug.plugins) + ''