nix-community.nixvim/plugins/utils/commentary.nix
2023-01-22 03:32:08 +00:00

24 lines
502 B
Nix

{ pkgs, config, lib, ... }:
with lib;
let
cfg = config.plugins.commentary;
in
{
# TODO Add support for aditional filetypes. This requires autocommands!
options = {
plugins.commentary = {
enable = mkEnableOption "commentary";
package = mkOption {
type = types.package;
default = pkgs.vimPlugins.vim-commentary;
description = "Plugin to use for vim-commentary";
};
};
};
config = mkIf cfg.enable {
extraPlugins = [ cfg.package ];
};
}