diff --git a/plugins/by-name/mini-files/default.nix b/plugins/by-name/mini-files/default.nix new file mode 100644 index 00000000..444b1fd2 --- /dev/null +++ b/plugins/by-name/mini-files/default.nix @@ -0,0 +1,45 @@ +{ lib, ... }: +lib.nixvim.plugins.mkNeovimPlugin { + name = "mini-files"; + moduleName = "mini.files"; + + maintainers = [ lib.maintainers.HeitorAugustoLN ]; + + settingsExample = { + content = { + filter = lib.nixvim.nestedLiteralLua "nil"; + highlight = lib.nixvim.nestedLiteralLua "nil"; + prefix = lib.nixvim.nestedLiteralLua "nil"; + sort = lib.nixvim.nestedLiteralLua "nil"; + }; + + mappings = { + close = "q"; + go_in = "l"; + go_in_plus = "L"; + go_out = "h"; + go_out_plus = "H"; + mark_goto = "'"; + mark_set = "m"; + reset = ""; + reveal_cwd = "@"; + show_help = "g?"; + synchronize = "="; + trim_left = "<"; + trim_right = ">"; + }; + + options = { + permanent_delete = true; + use_as_default_explorer = true; + }; + + windows = { + max_number = lib.nixvim.nestedLiteralLua "math.huge"; + preview = false; + width_focus = 50; + width_nofocus = 15; + width_preview = 25; + }; + }; +} diff --git a/tests/test-sources/plugins/by-name/mini-files/default.nix b/tests/test-sources/plugins/by-name/mini-files/default.nix new file mode 100644 index 00000000..2366e38e --- /dev/null +++ b/tests/test-sources/plugins/by-name/mini-files/default.nix @@ -0,0 +1,49 @@ +{ lib, ... }: +{ + empty = { + plugins.mini-files.enable = true; + }; + + defaults = { + plugins.mini-files = { + enable = true; + settings = { + content = { + filter = lib.nixvim.mkRaw "nil"; + highlight = lib.nixvim.mkRaw "nil"; + prefix = lib.nixvim.mkRaw "nil"; + sort = lib.nixvim.mkRaw "nil"; + }; + + mappings = { + close = "q"; + go_in = "l"; + go_in_plus = "L"; + go_out = "h"; + go_out_plus = "H"; + mark_goto = "'"; + mark_set = "m"; + reset = ""; + reveal_cwd = "@"; + show_help = "g?"; + synchronize = "="; + trim_left = "<"; + trim_right = ">"; + }; + + options = { + permanent_delete = true; + use_as_default_explorer = true; + }; + + windows = { + max_number = lib.nixvim.mkRaw "math.huge"; + preview = false; + width_focus = 50; + width_nofocus = 15; + width_preview = 25; + }; + }; + }; + }; +}