nixos-config/config/programs/vim/modules/languages/treesitter.nix

21 lines
420 B
Nix
Raw Normal View History

2022-08-10 08:20:23 +00:00
{
pkgs,
lib,
config,
...
}:
with lib; let
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))];
};
}