From e58472cee7077ecff39108e46ed23451f12f399a Mon Sep 17 00:00:00 2001 From: LilleAila Date: Fri, 17 Jan 2025 20:39:31 +0100 Subject: [PATCH] mini/jump2d: init --- docs/release-notes/rl-0.8.md | 1 + flake.lock | 17 +++++++++++++++++ flake.nix | 5 +++++ modules/plugins/mini/default.nix | 1 + modules/plugins/mini/jump2d/config.nix | 19 +++++++++++++++++++ modules/plugins/mini/jump2d/default.nix | 6 ++++++ modules/plugins/mini/jump2d/jump2d.nix | 13 +++++++++++++ 7 files changed, 62 insertions(+) create mode 100644 modules/plugins/mini/jump2d/config.nix create mode 100644 modules/plugins/mini/jump2d/default.nix create mode 100644 modules/plugins/mini/jump2d/jump2d.nix diff --git a/docs/release-notes/rl-0.8.md b/docs/release-notes/rl-0.8.md index 243ade98..62343038 100644 --- a/docs/release-notes/rl-0.8.md +++ b/docs/release-notes/rl-0.8.md @@ -76,6 +76,7 @@ - `mini.icons` - `mini.indentscope` - `mini.jump` + - `mini.jump2d` [kaktu5](https://github.com/kaktu5): diff --git a/flake.lock b/flake.lock index f5c97e34..4660fe7c 100644 --- a/flake.lock +++ b/flake.lock @@ -1288,6 +1288,22 @@ "type": "github" } }, + "plugin-mini-jump2d": { + "flake": false, + "locked": { + "lastModified": 1733662811, + "narHash": "sha256-+DihKCh6GYwin3H9YD+q30MLMRNXvvb1GtKnfBinGjc=", + "owner": "echasnovski", + "repo": "mini.jump2d", + "rev": "88077058297e80f1c76a18ed801ae9d7064187c6", + "type": "github" + }, + "original": { + "owner": "echasnovski", + "repo": "mini.jump2d", + "type": "github" + } + }, "plugin-minimap-vim": { "flake": false, "locked": { @@ -2506,6 +2522,7 @@ "plugin-mini-icons": "plugin-mini-icons", "plugin-mini-indentscope": "plugin-mini-indentscope", "plugin-mini-jump": "plugin-mini-jump", + "plugin-mini-jump2d": "plugin-mini-jump2d", "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 f47e2324..09baf235 100644 --- a/flake.nix +++ b/flake.nix @@ -855,5 +855,10 @@ url = "github:echasnovski/mini.jump"; flake = false; }; + + plugin-mini-jump2d = { + url = "github:echasnovski/mini.jump2d"; + flake = false; + }; }; } diff --git a/modules/plugins/mini/default.nix b/modules/plugins/mini/default.nix index 11bb1ace..2f4683c6 100644 --- a/modules/plugins/mini/default.nix +++ b/modules/plugins/mini/default.nix @@ -22,5 +22,6 @@ ./icons ./indentscope ./jump + ./jump2d ]; } diff --git a/modules/plugins/mini/jump2d/config.nix b/modules/plugins/mini/jump2d/config.nix new file mode 100644 index 00000000..da4ba55f --- /dev/null +++ b/modules/plugins/mini/jump2d/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.jump2d; +in { + vim = mkIf cfg.enable { + startPlugins = ["mini-jump2d"]; + + pluginRC.mini-jump2d = entryAnywhere '' + require("mini.jump2d").setup(${toLuaObject cfg.setupOpts}) + ''; + }; +} diff --git a/modules/plugins/mini/jump2d/default.nix b/modules/plugins/mini/jump2d/default.nix new file mode 100644 index 00000000..9065e4d6 --- /dev/null +++ b/modules/plugins/mini/jump2d/default.nix @@ -0,0 +1,6 @@ +{ + imports = [ + ./jump2d.nix + ./config.nix + ]; +} diff --git a/modules/plugins/mini/jump2d/jump2d.nix b/modules/plugins/mini/jump2d/jump2d.nix new file mode 100644 index 00000000..c25c6902 --- /dev/null +++ b/modules/plugins/mini/jump2d/jump2d.nix @@ -0,0 +1,13 @@ +{ + config, + lib, + ... +}: let + inherit (lib.options) mkEnableOption mkOption; + inherit (lib.nvim.types) mkPluginSetupOption; +in { + options.vim.mini.jump2d = { + enable = mkEnableOption "mini.jump2d"; + setupOpts = mkPluginSetupOption "mini.jump2d" {}; + }; +}