From 36f535c4ef907cf629633b72b65a71c503bc226a Mon Sep 17 00:00:00 2001 From: LilleAila Date: Fri, 17 Jan 2025 20:37:22 +0100 Subject: [PATCH] mini/jump: init --- docs/release-notes/rl-0.8.md | 1 + flake.lock | 17 +++++++++++++++++ flake.nix | 5 +++++ modules/plugins/mini/default.nix | 1 + modules/plugins/mini/jump/config.nix | 19 +++++++++++++++++++ modules/plugins/mini/jump/default.nix | 6 ++++++ modules/plugins/mini/jump/jump.nix | 13 +++++++++++++ 7 files changed, 62 insertions(+) create mode 100644 modules/plugins/mini/jump/config.nix create mode 100644 modules/plugins/mini/jump/default.nix create mode 100644 modules/plugins/mini/jump/jump.nix diff --git a/docs/release-notes/rl-0.8.md b/docs/release-notes/rl-0.8.md index b87f6431..243ade98 100644 --- a/docs/release-notes/rl-0.8.md +++ b/docs/release-notes/rl-0.8.md @@ -75,6 +75,7 @@ - `mini.hues` - `mini.icons` - `mini.indentscope` + - `mini.jump` [kaktu5](https://github.com/kaktu5): diff --git a/flake.lock b/flake.lock index a8d4c17d..f5c97e34 100644 --- a/flake.lock +++ b/flake.lock @@ -1272,6 +1272,22 @@ "type": "github" } }, + "plugin-mini-jump": { + "flake": false, + "locked": { + "lastModified": 1733662809, + "narHash": "sha256-qMP9ezk4xZov5S4vrUFM62lnc4YkEaZL1EVzdXwDq1Q=", + "owner": "echasnovski", + "repo": "mini.jump", + "rev": "bb93d998c9db6936697746330411f5fb9957145e", + "type": "github" + }, + "original": { + "owner": "echasnovski", + "repo": "mini.jump", + "type": "github" + } + }, "plugin-minimap-vim": { "flake": false, "locked": { @@ -2489,6 +2505,7 @@ "plugin-mini-hues": "plugin-mini-hues", "plugin-mini-icons": "plugin-mini-icons", "plugin-mini-indentscope": "plugin-mini-indentscope", + "plugin-mini-jump": "plugin-mini-jump", "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 cefd3a24..f47e2324 100644 --- a/flake.nix +++ b/flake.nix @@ -850,5 +850,10 @@ url = "github:echasnovski/mini.indentscope"; flake = false; }; + + plugin-mini-jump = { + url = "github:echasnovski/mini.jump"; + flake = false; + }; }; } diff --git a/modules/plugins/mini/default.nix b/modules/plugins/mini/default.nix index 73ff0951..11bb1ace 100644 --- a/modules/plugins/mini/default.nix +++ b/modules/plugins/mini/default.nix @@ -21,5 +21,6 @@ ./hues ./icons ./indentscope + ./jump ]; } diff --git a/modules/plugins/mini/jump/config.nix b/modules/plugins/mini/jump/config.nix new file mode 100644 index 00000000..665f96fd --- /dev/null +++ b/modules/plugins/mini/jump/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.jump; +in { + vim = mkIf cfg.enable { + startPlugins = ["mini-jump"]; + + pluginRC.mini-jump = entryAnywhere '' + require("mini.jump").setup(${toLuaObject cfg.setupOpts}) + ''; + }; +} diff --git a/modules/plugins/mini/jump/default.nix b/modules/plugins/mini/jump/default.nix new file mode 100644 index 00000000..cb1f9cb3 --- /dev/null +++ b/modules/plugins/mini/jump/default.nix @@ -0,0 +1,6 @@ +{ + imports = [ + ./jump.nix + ./config.nix + ]; +} diff --git a/modules/plugins/mini/jump/jump.nix b/modules/plugins/mini/jump/jump.nix new file mode 100644 index 00000000..ca9563d3 --- /dev/null +++ b/modules/plugins/mini/jump/jump.nix @@ -0,0 +1,13 @@ +{ + config, + lib, + ... +}: let + inherit (lib.options) mkEnableOption mkOption; + inherit (lib.nvim.types) mkPluginSetupOption; +in { + options.vim.mini.jump = { + enable = mkEnableOption "mini.jump"; + setupOpts = mkPluginSetupOption "mini.jump" {}; + }; +}