From 6060ae41829a548d317f5f08e239f4018bda4f07 Mon Sep 17 00:00:00 2001 From: LilleAila Date: Fri, 17 Jan 2025 20:57:49 +0100 Subject: [PATCH] mini/move: init --- docs/release-notes/rl-0.8.md | 1 + flake.lock | 17 +++++++++++++++++ flake.nix | 5 +++++ modules/plugins/mini/default.nix | 1 + modules/plugins/mini/move/config.nix | 19 +++++++++++++++++++ modules/plugins/mini/move/default.nix | 6 ++++++ modules/plugins/mini/move/move.nix | 13 +++++++++++++ 7 files changed, 62 insertions(+) create mode 100644 modules/plugins/mini/move/config.nix create mode 100644 modules/plugins/mini/move/default.nix create mode 100644 modules/plugins/mini/move/move.nix diff --git a/docs/release-notes/rl-0.8.md b/docs/release-notes/rl-0.8.md index 1d2308ab..824dc305 100644 --- a/docs/release-notes/rl-0.8.md +++ b/docs/release-notes/rl-0.8.md @@ -79,6 +79,7 @@ - `mini.jump2d` - `mini.map` - `mini.misc` + - `mini.move` [kaktu5](https://github.com/kaktu5): diff --git a/flake.lock b/flake.lock index 39acee39..03d1e0b5 100644 --- a/flake.lock +++ b/flake.lock @@ -1336,6 +1336,22 @@ "type": "github" } }, + "plugin-mini-move": { + "flake": false, + "locked": { + "lastModified": 1723711319, + "narHash": "sha256-nX0eAlhMnKhAftgM6qeHUuawagumLQMPKDkqZNPLljg=", + "owner": "echasnovski", + "repo": "mini.move", + "rev": "4caa1c212f5ca3d1633d21cfb184808090ed74b1", + "type": "github" + }, + "original": { + "owner": "echasnovski", + "repo": "mini.move", + "type": "github" + } + }, "plugin-minimap-vim": { "flake": false, "locked": { @@ -2557,6 +2573,7 @@ "plugin-mini-jump2d": "plugin-mini-jump2d", "plugin-mini-map": "plugin-mini-map", "plugin-mini-misc": "plugin-mini-misc", + "plugin-mini-move": "plugin-mini-move", "plugin-minimap-vim": "plugin-minimap-vim", "plugin-modes-nvim": "plugin-modes-nvim", "plugin-neo-tree-nvim": "plugin-neo-tree-nvim", diff --git a/flake.nix b/flake.nix index d6a57ee7..def1cd8c 100644 --- a/flake.nix +++ b/flake.nix @@ -870,5 +870,10 @@ url = "github:echasnovski/mini.misc"; flake = false; }; + + plugin-mini-move = { + url = "github:echasnovski/mini.move"; + flake = false; + }; }; } diff --git a/modules/plugins/mini/default.nix b/modules/plugins/mini/default.nix index 093ae3a4..a1c5a191 100644 --- a/modules/plugins/mini/default.nix +++ b/modules/plugins/mini/default.nix @@ -25,5 +25,6 @@ ./jump2d ./map ./misc + ./move ]; } diff --git a/modules/plugins/mini/move/config.nix b/modules/plugins/mini/move/config.nix new file mode 100644 index 00000000..8bf22526 --- /dev/null +++ b/modules/plugins/mini/move/config.nix @@ -0,0 +1,19 @@ +{ + config, + lib, + ... +}: let + inherit (lib.modules) mkIf; + inherit (lib.nvim.dag) entryAnywhere; + inherit (lib.nvim.lua) toLuaObject; + + cfg = config.vim.mini.move; +in { + vim = mkIf cfg.enable { + startPlugins = ["mini-move"]; + + pluginRC.mini-move = entryAnywhere '' + require("mini.move").setup(${toLuaObject cfg.setupOpts}) + ''; + }; +} diff --git a/modules/plugins/mini/move/default.nix b/modules/plugins/mini/move/default.nix new file mode 100644 index 00000000..83caee30 --- /dev/null +++ b/modules/plugins/mini/move/default.nix @@ -0,0 +1,6 @@ +{ + imports = [ + ./move.nix + ./config.nix + ]; +} diff --git a/modules/plugins/mini/move/move.nix b/modules/plugins/mini/move/move.nix new file mode 100644 index 00000000..e97e837b --- /dev/null +++ b/modules/plugins/mini/move/move.nix @@ -0,0 +1,13 @@ +{ + config, + lib, + ... +}: let + inherit (lib.options) mkEnableOption mkOption; + inherit (lib.nvim.types) mkPluginSetupOption; +in { + options.vim.mini.move = { + enable = mkEnableOption "mini.move"; + setupOpts = mkPluginSetupOption "mini.move" {}; + }; +}