flake-modules/new-plugin: sync with plugins/TEMPLATE.nix

This commit is contained in:
Austin Horstman 2025-05-07 23:26:17 -05:00
parent f9fd831691
commit 887a9fdff0
No known key found for this signature in database
2 changed files with 10 additions and 4 deletions

View file

@ -9,14 +9,18 @@ from argparse import ArgumentParser
default_nix_template = """{{ lib, ... }}: default_nix_template = """{{ lib, ... }}:
lib.nixvim.plugins.mkNeovimPlugin {{ lib.nixvim.plugins.mkNeovimPlugin {{
name = "{name}"; name = "{name}";
moduleName = "LUA_MODULE_NAME"; # TODO replace (or remove entirely if it is the same as `name`)
packPathName = "{originalName}"; packPathName = "{originalName}";
package = "{package}"; package = "{package}";
# TODO # TODO replace with your name
maintainers = [ lib.maintainers.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 = {{ settingsExample = {{
exampleOption = true; foo = 42;
bar.__raw = "function() print('hello') end";
}}; }};
}} }}
""" """
@ -31,7 +35,8 @@ test_nix_template = """{{
plugins.{name} = {{ plugins.{name} = {{
enable = true; enable = true;
settings = {{ settings = {{
exampleOption = false; foo = 42;
bar.__raw = "function() print('hello') end";
}}; }};
}}; }};
}}; }};

View file

@ -5,7 +5,8 @@ lib.nixvim.plugins.mkNeovimPlugin {
packPathName = "my-plugin.nvim"; # TODO replace (or remove entirely if it is the same as `name`) packPathName = "my-plugin.nvim"; # TODO replace (or remove entirely if it is the same as `name`)
package = "my-plugin-nvim"; # TODO replace 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) # 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 # NOTE you can use `lib.literalExpression` or `lib.literalMD` if needed