diff --git a/docs/release-notes/rl-0.8.md b/docs/release-notes/rl-0.8.md index 54ce0492..51a9d8db 100644 --- a/docs/release-notes/rl-0.8.md +++ b/docs/release-notes/rl-0.8.md @@ -66,6 +66,7 @@ - `mini.comment` - `mini.completion` - `mini.diff` + - `mini.doc` [kaktu5](https://github.com/kaktu5): diff --git a/flake.lock b/flake.lock index 37011895..3ddb9ac8 100644 --- a/flake.lock +++ b/flake.lock @@ -1128,6 +1128,22 @@ "type": "github" } }, + "plugin-mini-doc": { + "flake": false, + "locked": { + "lastModified": 1723308950, + "narHash": "sha256-Q3DAEV1ZHS+lFhZKFCNoIjn41ksk7WRrVP2b2d6uSss=", + "owner": "echasnovski", + "repo": "mini.doc", + "rev": "bb73a3d1ff390f7e2740027ea2567017099a237c", + "type": "github" + }, + "original": { + "owner": "echasnovski", + "repo": "mini.doc", + "type": "github" + } + }, "plugin-minimap-vim": { "flake": false, "locked": { @@ -2336,6 +2352,7 @@ "plugin-mini-comment": "plugin-mini-comment", "plugin-mini-completion": "plugin-mini-completion", "plugin-mini-diff": "plugin-mini-diff", + "plugin-mini-doc": "plugin-mini-doc", "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 36ca93c5..7e8323ed 100644 --- a/flake.nix +++ b/flake.nix @@ -805,5 +805,10 @@ url = "github:echasnovski/mini.diff"; flake = false; }; + + plugin-mini-doc = { + url = "github:echasnovski/mini.doc"; + flake = false; + }; }; } diff --git a/modules/plugins/mini/default.nix b/modules/plugins/mini/default.nix index b8e665bf..fb4f7000 100644 --- a/modules/plugins/mini/default.nix +++ b/modules/plugins/mini/default.nix @@ -12,5 +12,6 @@ ./comment ./completion ./diff + ./doc ]; } diff --git a/modules/plugins/mini/doc/config.nix b/modules/plugins/mini/doc/config.nix new file mode 100644 index 00000000..e9df43b8 --- /dev/null +++ b/modules/plugins/mini/doc/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.doc; +in { + vim = mkIf cfg.enable { + startPlugins = ["mini-doc"]; + + pluginRC.mini-doc = entryAnywhere '' + require("mini.doc").setup(${toLuaObject cfg.setupOpts}) + ''; + }; +} diff --git a/modules/plugins/mini/doc/default.nix b/modules/plugins/mini/doc/default.nix new file mode 100644 index 00000000..bccfa883 --- /dev/null +++ b/modules/plugins/mini/doc/default.nix @@ -0,0 +1,6 @@ +{ + imports = [ + ./doc.nix + ./config.nix + ]; +} diff --git a/modules/plugins/mini/doc/doc.nix b/modules/plugins/mini/doc/doc.nix new file mode 100644 index 00000000..f1e65730 --- /dev/null +++ b/modules/plugins/mini/doc/doc.nix @@ -0,0 +1,13 @@ +{ + config, + lib, + ... +}: let + inherit (lib.options) mkEnableOption mkOption; + inherit (lib.nvim.types) mkPluginSetupOption; +in { + options.vim.mini.doc = { + enable = mkEnableOption "mini.doc"; + setupOpts = mkPluginSetupOption "mini.doc" {}; + }; +}