From fa30bc6b37bf0a2e4ebebad18d8c436f9d4eabf8 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 59233583a0..db0953d452 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 d59c79642c..6290bdfe0a 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") + ''; + }; }