Skip to content

Commit

Permalink
modules/performance: add plenary filetypes directory to default paths…
Browse files Browse the repository at this point in the history
…ToLink

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.
  • Loading branch information
stasjok authored and traxys committed Jul 24, 2024
1 parent 532b004 commit 6e2ec5e
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
2 changes: 2 additions & 0 deletions modules/performance.nix
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,8 @@ in
"/after"
# ftdetect
"/ftdetect"
# plenary.nvim
"/data/plenary/filetypes"
];
};
}
10 changes: 10 additions & 0 deletions tests/test-sources/modules/performance/combine-plugins.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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")
'';
};
}

0 comments on commit 6e2ec5e

Please sign in to comment.