summary refs log tree commit diff
diff options
context:
space:
mode:
authorMatthieu Coudron <mcoudron@hotmail.com>2021-09-14 21:49:16 +0200
committerMatthieu Coudron <mcoudron@hotmail.com>2021-09-17 00:33:03 +0200
commit761b2c6ff342425388db38b86f1c49cbdb232514 (patch)
tree1599bf0eb7caa76458cd117172e523c1d3a09a7c
parent47eaf6727bd362dac94eab91b7fdc876642d578b (diff)
downloadnixpkgs-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.nix11
-rw-r--r--pkgs/misc/vim-plugins/build-vim-plugin.nix2
-rw-r--r--pkgs/misc/vim-plugins/vim-utils.nix2
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) + ''