plugins/commentary: switch to mkVimPlugin

This commit is contained in:
Gaetan Lepage 2024-12-15 15:52:39 +01:00 committed by nix-infra-bot
parent 64681ae84c
commit 452c30f747

View file

@ -1,29 +1,16 @@
{
lib,
helpers,
config,
pkgs,
...
}:
with lib;
let
cfg = config.plugins.commentary;
in
{
helpers.vim-plugin.mkVimPlugin {
name = "commentary";
packPathName = "vim-commentary";
package = "vim-commentary";
# TODO Add support for additional filetypes. This requires autocommands!
options = {
plugins.commentary = {
enable = mkEnableOption "commentary";
maintainers = [ lib.maintainers.GaetanLepage ];
package = lib.mkPackageOption pkgs "commentary" {
default = [
"vimPlugins"
"vim-commentary"
];
};
};
};
config = mkIf cfg.enable { extraPlugins = [ cfg.package ]; };
# This plugin has no config options
}