nix-community.nixvim/plugins/utils/commentary.nix
2023-02-20 10:42:13 +00:00

24 lines
469 B
Nix

{
pkgs,
config,
lib,
...
}:
with lib; let
cfg = config.plugins.commentary;
helpers = import ../helpers.nix {inherit lib;};
in {
# TODO Add support for aditional filetypes. This requires autocommands!
options = {
plugins.commentary = {
enable = mkEnableOption "commentary";
package = helpers.mkPackageOption "commentary" pkgs.vimPlugins.vim-commentary;
};
};
config = mkIf cfg.enable {
extraPlugins = [cfg.package];
};
}