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 f7b3f64847
commit 0754cdc51d
2 changed files with 10 additions and 4 deletions

View file

@ -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";
}};
}};
}};

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`)
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