nix-community.nixvim/plugins/utils/commentary.nix

25 lines
510 B
Nix
Raw Normal View History

2021-02-10 15:17:21 +00:00
{ pkgs, config, lib, ... }:
with lib;
let
cfg = config.plugins.commentary;
2021-02-10 15:17:21 +00:00
in
{
# TODO Add support for aditional filetypes. This requires autocommands!
options = {
plugins.commentary = {
2021-02-10 15:17:21 +00:00
enable = mkEnableOption "Enable commentary";
2023-01-17 23:01:58 +01:00
package = mkOption {
type = types.package;
default = pkgs.vimPlugins.vim-commentary;
description = "Plugin to use for vim-commentary";
};
2021-02-10 15:17:21 +00:00
};
};
config = mkIf cfg.enable {
2023-01-17 23:01:58 +01:00
extraPlugins = [ cfg.package ];
2021-02-10 15:17:21 +00:00
};
}