2022-08-10 08:20:23 +00:00
|
|
|
{
|
|
|
|
pkgs,
|
|
|
|
lib,
|
|
|
|
config,
|
|
|
|
...
|
|
|
|
}:
|
|
|
|
with lib; let
|
2022-08-09 15:30:56 +00:00
|
|
|
cfg = config.treesitter;
|
|
|
|
grammars = pkgs.tree-sitter.builtGrammars;
|
|
|
|
in {
|
|
|
|
options.treesitter.enable = mkEnableOption "tree-sitter";
|
|
|
|
|
|
|
|
config = mkIf cfg.enable {
|
|
|
|
plugin.setup."nvim-treesitter.configs" = {
|
|
|
|
highlight.enable = true;
|
|
|
|
};
|
|
|
|
|
2022-08-10 08:20:23 +00:00
|
|
|
output.plugins = with pkgs.vimPlugins; [(nvim-treesitter.withPlugins (_: pkgs.tree-sitter.allGrammars))];
|
2022-08-09 15:30:56 +00:00
|
|
|
};
|
|
|
|
}
|