From 5df9ad422728f3141e31541d525361caa697393c Mon Sep 17 00:00:00 2001 From: jasmine Date: Sun, 22 Jun 2025 20:50:58 +0800 Subject: [PATCH] install mini.ai --- config/default.nix | 1 + config/plugins/editor/mini.nix | 31 +++++++++++++++++++++++++++++++ 2 files changed, 32 insertions(+) create mode 100644 config/plugins/editor/mini.nix diff --git a/config/default.nix b/config/default.nix index f97e651..06c1b19 100644 --- a/config/default.nix +++ b/config/default.nix @@ -20,6 +20,7 @@ # Editor plugins and configurations ./plugins/editor/buffers.nix ./plugins/editor/commentary.nix + ./plugins/editor/mini.nix ./plugins/editor/sessions.nix ./plugins/editor/smart-splits.nix ./plugins/editor/surround.nix diff --git a/config/plugins/editor/mini.nix b/config/plugins/editor/mini.nix new file mode 100644 index 0000000..ebd2c40 --- /dev/null +++ b/config/plugins/editor/mini.nix @@ -0,0 +1,31 @@ +{...}:{ + plugins.mini = { + enable = true; + + # Extend and create a/i textobjects. + modules.ai = { + # Module mappings. + mappings = { + # Main textobject prefixes + around = "a"; + inside = "i"; + + # Next/last variants + around_next = "an"; + inside_next = "in"; + around_last = "al"; + inside_last = "il"; + + # Move cursor to corresponding edge of `a` textobject + goto_left = "g["; + goto_right = "g]"; + }; + + # Number of lines within which textobject is searched + n_lines = 50; + + # How to search for object + search_method = "cover_or_next"; + }; + }; +}