From 4cc7ab6c6ae1f354a7794248bf5fb2a1c2b80a4a Mon Sep 17 00:00:00 2001 From: Heitor Augusto <44377258+HeitorAugustoLN@users.noreply.github.com> Date: Sun, 2 Nov 2025 01:30:43 -0300 Subject: [PATCH] plugins/mini-indentscope: init --- plugins/by-name/mini-indentscope/default.nix | 31 ++++++++++++++++ .../by-name/mini-indentscope/default.nix | 35 +++++++++++++++++++ 2 files changed, 66 insertions(+) create mode 100644 plugins/by-name/mini-indentscope/default.nix create mode 100644 tests/test-sources/plugins/by-name/mini-indentscope/default.nix diff --git a/plugins/by-name/mini-indentscope/default.nix b/plugins/by-name/mini-indentscope/default.nix new file mode 100644 index 00000000..59f7e9f0 --- /dev/null +++ b/plugins/by-name/mini-indentscope/default.nix @@ -0,0 +1,31 @@ +{ lib, ... }: +lib.nixvim.plugins.mkNeovimPlugin { + name = "mini-indentscope"; + moduleName = "mini.indentscope"; + + maintainers = [ lib.maintainers.HeitorAugustoLN ]; + + settingsExample = { + draw = { + delay = 100; + predicate = lib.nixvim.nestedLiteralLua "function (scope) return not scope.body.is_incomplete end"; + priority = 2; + }; + + mappings = { + object_scope = "ii"; + object_scope_with_border = "ai"; + goto_top = "[i"; + goto_bottom = "]i"; + }; + + options = { + border = "both"; + indent_at_cursor = true; + n_lines = 10000; + try_as_border = false; + }; + + symbol = "╎"; + }; +} diff --git a/tests/test-sources/plugins/by-name/mini-indentscope/default.nix b/tests/test-sources/plugins/by-name/mini-indentscope/default.nix new file mode 100644 index 00000000..61caeb98 --- /dev/null +++ b/tests/test-sources/plugins/by-name/mini-indentscope/default.nix @@ -0,0 +1,35 @@ +{ lib, ... }: +{ + empty = { + plugins.mini-indentscope.enable = true; + }; + + defaults = { + plugins.mini-indentscope = { + enable = true; + settings = { + draw = { + delay = 100; + predicate = lib.nixvim.mkRaw "function (scope) return not scope.body.is_incomplete end"; + priority = 2; + }; + + mappings = { + object_scope = "ii"; + object_scope_with_border = "ai"; + goto_top = "[i"; + goto_bottom = "]i"; + }; + + options = { + border = "both"; + indent_at_cursor = true; + n_lines = 10000; + try_as_border = false; + }; + + symbol = "╎"; + }; + }; + }; +}