diff options
author | Matthieu Coudron <mcoudron@hotmail.com> | 2021-09-14 21:49:16 +0200 |
---|---|---|
committer | Matthieu Coudron <mcoudron@hotmail.com> | 2021-09-17 00:33:03 +0200 |
commit | 761b2c6ff342425388db38b86f1c49cbdb232514 (patch) | |
tree | 1599bf0eb7caa76458cd117172e523c1d3a09a7c | |
parent | 47eaf6727bd362dac94eab91b7fdc876642d578b (diff) | |
download | nixpkgs-761b2c6ff342425388db38b86f1c49cbdb232514.tar nixpkgs-761b2c6ff342425388db38b86f1c49cbdb232514.tar.gz nixpkgs-761b2c6ff342425388db38b86f1c49cbdb232514.tar.bz2 nixpkgs-761b2c6ff342425388db38b86f1c49cbdb232514.tar.lz nixpkgs-761b2c6ff342425388db38b86f1c49cbdb232514.tar.xz nixpkgs-761b2c6ff342425388db38b86f1c49cbdb232514.tar.zst nixpkgs-761b2c6ff342425388db38b86f1c49cbdb232514.zip |
neovim.tests: complete plug test
to check that it can correctly load the colorscheme
-rw-r--r-- | pkgs/applications/editors/neovim/tests.nix | 11 | ||||
-rw-r--r-- | pkgs/misc/vim-plugins/build-vim-plugin.nix | 2 | ||||
-rw-r--r-- | pkgs/misc/vim-plugins/vim-utils.nix | 2 |
3 files changed, 12 insertions, 3 deletions
diff --git a/pkgs/applications/editors/neovim/tests.nix b/pkgs/applications/editors/neovim/tests.nix index 202b18efb8c..e442de6939b 100644 --- a/pkgs/applications/editors/neovim/tests.nix +++ b/pkgs/applications/editors/neovim/tests.nix @@ -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; diff --git a/pkgs/misc/vim-plugins/build-vim-plugin.nix b/pkgs/misc/vim-plugins/build-vim-plugin.nix index b6c75e03654..90960da7844 100644 --- a/pkgs/misc/vim-plugins/build-vim-plugin.nix +++ b/pkgs/misc/vim-plugins/build-vim-plugin.nix @@ -6,7 +6,7 @@ rec { addRtp = path: attrs: derivation: - derivation // { rtp = "${derivation}/${path}"; } // { + derivation // { rtp = "${derivation}"; } // { overrideAttrs = f: buildVimPlugin (attrs // f attrs); }; diff --git a/pkgs/misc/vim-plugins/vim-utils.nix b/pkgs/misc/vim-plugins/vim-utils.nix index 0516a84ce95..28512e5ede6 100644 --- a/pkgs/misc/vim-plugins/vim-utils.nix +++ b/pkgs/misc/vim-plugins/vim-utils.nix @@ -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) + '' |