diff --git a/plugins/by-name/mini-comment/default.nix b/plugins/by-name/mini-comment/default.nix new file mode 100644 index 00000000..56e4f4c9 --- /dev/null +++ b/plugins/by-name/mini-comment/default.nix @@ -0,0 +1,26 @@ +{ lib, ... }: +lib.nixvim.plugins.mkNeovimPlugin { + name = "mini-comment"; + moduleName = "mini.comment"; + + maintainers = [ lib.maintainers.HeitorAugustoLN ]; + + settingsExample = { + options = { + custom_commentstring = lib.nixvim.nestedLiteralLua "nil"; + ignore_blank_line = false; + start_of_line = false; + pad_comment_parts = true; + }; + mappings = { + comment = "gc"; + comment_line = "gcc"; + comment_visual = "gc"; + textobject = "gc"; + }; + hooks = { + pre = lib.nixvim.nestedLiteralLua "function() end"; + post = lib.nixvim.nestedLiteralLua "function() end"; + }; + }; +} diff --git a/tests/test-sources/plugins/by-name/mini-comment/default.nix b/tests/test-sources/plugins/by-name/mini-comment/default.nix new file mode 100644 index 00000000..00ea43ee --- /dev/null +++ b/tests/test-sources/plugins/by-name/mini-comment/default.nix @@ -0,0 +1,30 @@ +{ lib, ... }: +{ + empty = { + plugins.mini-comment.enable = true; + }; + + defaults = { + plugins.mini-comment = { + enable = true; + settings = { + options = { + custom_commentstring = lib.nixvim.mkRaw "nil"; + ignore_blank_line = false; + start_of_line = false; + pad_comment_parts = true; + }; + mappings = { + comment = "gc"; + comment_line = "gcc"; + comment_visual = "gc"; + textobject = "gc"; + }; + hooks = { + pre = lib.nixvim.mkRaw "function() end"; + post = lib.nixvim.mkRaw "function() end"; + }; + }; + }; + }; +}