2023-12-30 23:50:12 +01:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
helpers,
|
|
|
|
config,
|
|
|
|
pkgs,
|
|
|
|
...
|
|
|
|
}:
|
|
|
|
with lib; let
|
|
|
|
cfg = config.plugins.my-plugin; # TODO replace
|
|
|
|
in {
|
|
|
|
meta.maintainers = [maintainers.MyName]; # TODO replace with your name
|
|
|
|
|
|
|
|
# TODO replace
|
|
|
|
options.plugins.my-plugin =
|
2024-01-25 16:15:55 +01:00
|
|
|
helpers.neovim-plugin.extraOptionsOptions
|
2023-12-30 23:50:12 +01:00
|
|
|
// {
|
|
|
|
enable = mkEnableOption "my-plugin.nvim"; # TODO replace
|
|
|
|
|
|
|
|
package = helpers.mkPackageOption "my-plugin.nvim" pkgs.vimPlugins.my-plugin-nvim; # TODO replace
|
|
|
|
};
|
|
|
|
|
|
|
|
config = mkIf cfg.enable {
|
|
|
|
extraPlugins = [cfg.package];
|
|
|
|
|
|
|
|
extraConfigLua = let
|
|
|
|
setupOptions = with cfg;
|
|
|
|
{
|
|
|
|
}
|
|
|
|
// cfg.extraOptions;
|
|
|
|
in ''
|
|
|
|
require('my-plugin').setup(${helpers.toLuaObject setupOptions})
|
|
|
|
'';
|
|
|
|
};
|
|
|
|
}
|