summary refs log tree commit diff
path: root/pkgs/applications/editors/neovim
diff options
context:
space:
mode:
authorLeixB <abone9999@gmail.com>2023-03-14 12:45:33 +0100
committerLeixB <abone9999@gmail.com>2023-03-14 12:45:33 +0100
commitb9220710d109a9b03400d183cf08c22c4d6aead3 (patch)
tree9a5d888a3a6cf0c8ab26779f29dd8bf2107845fe /pkgs/applications/editors/neovim
parent59a4dd867822a7115e5f6f844488ab00694b2c80 (diff)
downloadnixpkgs-b9220710d109a9b03400d183cf08c22c4d6aead3.tar
nixpkgs-b9220710d109a9b03400d183cf08c22c4d6aead3.tar.gz
nixpkgs-b9220710d109a9b03400d183cf08c22c4d6aead3.tar.bz2
nixpkgs-b9220710d109a9b03400d183cf08c22c4d6aead3.tar.lz
nixpkgs-b9220710d109a9b03400d183cf08c22c4d6aead3.tar.xz
nixpkgs-b9220710d109a9b03400d183cf08c22c4d6aead3.tar.zst
nixpkgs-b9220710d109a9b03400d183cf08c22c4d6aead3.zip
neovim: add test for help tags on plugins from luaPackages
Diffstat (limited to 'pkgs/applications/editors/neovim')
-rw-r--r--pkgs/applications/editors/neovim/tests/default.nix22
1 files changed, 22 insertions, 0 deletions
diff --git a/pkgs/applications/editors/neovim/tests/default.nix b/pkgs/applications/editors/neovim/tests/default.nix
index 8a4e86ef655..707a310b632 100644
--- a/pkgs/applications/editors/neovim/tests/default.nix
+++ b/pkgs/applications/editors/neovim/tests/default.nix
@@ -157,6 +157,28 @@ rec {
     '';
   });
 
+  # check that the vim-doc hook correctly generates the tag
+  # for neovim packages from luaPackages
+  # we know for a fact gitsigns-nvim has a doc folder and comes from luaPackages
+  checkForTagsLuaPackages = vimPlugins.gitsigns-nvim.overrideAttrs(oldAttrs: {
+    doInstallCheck = true;
+    installCheckPhase = ''
+      [ -f $out/doc/tags ]
+    '';
+  });
+
+  nvim_with_gitsigns_plugin = neovim.override {
+    extraName = "-with-gitsigns-plugin";
+    configure.packages.plugins = {
+      start = [
+        vimPlugins.gitsigns-nvim
+      ];
+    };
+  };
+  checkHelpLuaPackages = runTest nvim_with_gitsigns_plugin ''
+    export HOME=$TMPDIR
+    ${nvim_with_gitsigns_plugin}/bin/nvim -i NONE -c 'help gitsigns' +quitall! -e
+  '';
 
   # nixpkgs should detect that no wrapping is necessary
   nvimShouldntWrap = wrapNeovim2 "-should-not-wrap" nvimAutoDisableWrap;