From 6e2ec5ed02a60cf4c159bf923ae7566facd75e3d Mon Sep 17 00:00:00 2001 From: Stanislav Asunkin <1353637+stasjok@users.noreply.github.com> Date: Tue, 16 Jul 2024 14:45:12 +0300 Subject: [PATCH] modules/performance: add plenary filetypes directory to default pathsToLink plenary.nvim is often pulled as a dependency of other plugins. It has filetype definitions in `data/plenary/filetypes` directory. Even though I don't think there are plugins using it instead of vim.filetype, but it should be no harm to add this directory by default. --- modules/performance.nix | 2 ++ .../modules/performance/combine-plugins.nix | 10 ++++++++++ 2 files changed, 12 insertions(+) diff --git a/modules/performance.nix b/modules/performance.nix index 59233583..db0953d4 100644 --- a/modules/performance.nix +++ b/modules/performance.nix @@ -56,6 +56,8 @@ in "/after" # ftdetect "/ftdetect" + # plenary.nvim + "/data/plenary/filetypes" ]; }; } diff --git a/tests/test-sources/modules/performance/combine-plugins.nix b/tests/test-sources/modules/performance/combine-plugins.nix index d59c7964..6290bdfe 100644 --- a/tests/test-sources/modules/performance/combine-plugins.nix +++ b/tests/test-sources/modules/performance/combine-plugins.nix @@ -374,4 +374,14 @@ in } ]; }; + + # Test if plenary.filetype is working + plenary-nvim = { + performance.combinePlugins.enable = true; + extraPlugins = [ pkgs.vimPlugins.plenary-nvim ]; + extraConfigLuaPost = '' + -- Plenary filetype detection is usable + assert(require("plenary.filetype").detect(".bashrc") == "sh", "plenary.filetype is not working") + ''; + }; }