diff --git a/flake/dev/new-plugin.py b/flake/dev/new-plugin.py index 4be41c38..9812748c 100644 --- a/flake/dev/new-plugin.py +++ b/flake/dev/new-plugin.py @@ -9,14 +9,18 @@ from argparse import ArgumentParser default_nix_template = """{{ lib, ... }}: lib.nixvim.plugins.mkNeovimPlugin {{ name = "{name}"; + moduleName = "LUA_MODULE_NAME"; # TODO replace (or remove entirely if it is the same as `name`) packPathName = "{originalName}"; package = "{package}"; - # TODO + # TODO replace with your name maintainers = [ lib.maintainers.YOUR_NAME ]; + # TODO provide an example for the `settings` option (or remove entirely if there is no useful example) + # NOTE you can use `lib.literalExpression` or `lib.literalMD` if needed settingsExample = {{ - exampleOption = true; + foo = 42; + bar.__raw = "function() print('hello') end"; }}; }} """ @@ -31,7 +35,8 @@ test_nix_template = """{{ plugins.{name} = {{ enable = true; settings = {{ - exampleOption = false; + foo = 42; + bar.__raw = "function() print('hello') end"; }}; }}; }}; diff --git a/plugins/TEMPLATE.nix b/plugins/TEMPLATE.nix index dcf4f02c..2babe824 100644 --- a/plugins/TEMPLATE.nix +++ b/plugins/TEMPLATE.nix @@ -5,7 +5,8 @@ lib.nixvim.plugins.mkNeovimPlugin { packPathName = "my-plugin.nvim"; # TODO replace (or remove entirely if it is the same as `name`) package = "my-plugin-nvim"; # TODO replace - maintainers = [ lib.maintainers.MyName ]; # TODO replace with your name + # TODO replace with your name + maintainers = [ lib.maintainers.MyName ]; # TODO provide an example for the `settings` option (or remove entirely if there is no useful example) # NOTE you can use `lib.literalExpression` or `lib.literalMD` if needed