diff --git a/docs/release-notes/rl-0.8.md b/docs/release-notes/rl-0.8.md index 62343038..642dcc1b 100644 --- a/docs/release-notes/rl-0.8.md +++ b/docs/release-notes/rl-0.8.md @@ -77,6 +77,7 @@ - `mini.indentscope` - `mini.jump` - `mini.jump2d` + - `mini.map` [kaktu5](https://github.com/kaktu5): diff --git a/flake.lock b/flake.lock index 4660fe7c..4e9aec66 100644 --- a/flake.lock +++ b/flake.lock @@ -1304,6 +1304,22 @@ "type": "github" } }, + "plugin-mini-map": { + "flake": false, + "locked": { + "lastModified": 1725613927, + "narHash": "sha256-dL+d92+GLAILQ/A1JVCwoe3B5WtwVK01tPuC+fOTB5A=", + "owner": "echasnovski", + "repo": "mini.map", + "rev": "4c58e755d75f9999abcd3b3c6e934734b6a8b098", + "type": "github" + }, + "original": { + "owner": "echasnovski", + "repo": "mini.map", + "type": "github" + } + }, "plugin-minimap-vim": { "flake": false, "locked": { @@ -2523,6 +2539,7 @@ "plugin-mini-indentscope": "plugin-mini-indentscope", "plugin-mini-jump": "plugin-mini-jump", "plugin-mini-jump2d": "plugin-mini-jump2d", + "plugin-mini-map": "plugin-mini-map", "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 09baf235..75efb0d1 100644 --- a/flake.nix +++ b/flake.nix @@ -860,5 +860,10 @@ url = "github:echasnovski/mini.jump2d"; flake = false; }; + + plugin-mini-map = { + url = "github:echasnovski/mini.map"; + flake = false; + }; }; } diff --git a/modules/plugins/mini/default.nix b/modules/plugins/mini/default.nix index 2f4683c6..f7c8cf8b 100644 --- a/modules/plugins/mini/default.nix +++ b/modules/plugins/mini/default.nix @@ -23,5 +23,6 @@ ./indentscope ./jump ./jump2d + ./map ]; } diff --git a/modules/plugins/mini/map/config.nix b/modules/plugins/mini/map/config.nix new file mode 100644 index 00000000..7a299eb8 --- /dev/null +++ b/modules/plugins/mini/map/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.map; +in { + vim = mkIf cfg.enable { + startPlugins = ["mini-map"]; + + pluginRC.mini-map = entryAnywhere '' + require("mini.map").setup(${toLuaObject cfg.setupOpts}) + ''; + }; +} diff --git a/modules/plugins/mini/map/default.nix b/modules/plugins/mini/map/default.nix new file mode 100644 index 00000000..71110431 --- /dev/null +++ b/modules/plugins/mini/map/default.nix @@ -0,0 +1,6 @@ +{ + imports = [ + ./map.nix + ./config.nix + ]; +} diff --git a/modules/plugins/mini/map/map.nix b/modules/plugins/mini/map/map.nix new file mode 100644 index 00000000..554e2072 --- /dev/null +++ b/modules/plugins/mini/map/map.nix @@ -0,0 +1,13 @@ +{ + config, + lib, + ... +}: let + inherit (lib.options) mkEnableOption mkOption; + inherit (lib.nvim.types) mkPluginSetupOption; +in { + options.vim.mini.map = { + enable = mkEnableOption "mini.map"; + setupOpts = mkPluginSetupOption "mini.map" {}; + }; +}