From 3543c84062537d5a7ed3ffd56bc4ea0b3468c256 Mon Sep 17 00:00:00 2001 From: Gaetan Lepage Date: Wed, 6 Mar 2024 10:42:36 +0100 Subject: [PATCH] plugins/TEMPLATE.nix: improve the template --- plugins/TEMPLATE.nix | 19 +++++++++++++++---- 1 file changed, 15 insertions(+), 4 deletions(-) diff --git a/plugins/TEMPLATE.nix b/plugins/TEMPLATE.nix index 8660b5ca..a7dc05ed 100644 --- a/plugins/TEMPLATE.nix +++ b/plugins/TEMPLATE.nix @@ -7,14 +7,25 @@ }: helpers.neovim-plugin.mkNeovimPlugin config { name = "my-plugin"; - originalName = "my-plugin.nvim"; + originalName = "my-plugin.nvim"; # TODO replace (or remove entirely if it is the same as `name`) defaultPackage = pkgs.vimPlugins.my-plugin-nvim; # TODO replace - # Optionnally provide an example for the `settings` option. + maintainers = [lib.maintainers.MyName]; # TODO replace with your name + + # Optionnally, explicitly declare some options. You don't have to. + settingsOptions = { + foo = helpers.defaultNullOpts.mkUnsignedInt 97 '' + The best birth year. + ''; + + great_feature = helpers.defaultNullOpts.mkBool false '' + Whether to enable the great feature. + ''; + }; + + # Optionnally, provide an example for the `settings` option. settingsExample = { foo = 42; bar.__raw = "function() print('hello') end"; }; - - maintainers = [lib.maintainers.MyName]; # TODO replace with your name }