From e8e5594fb9a9b68a5b42062318c88bc9aaf2dfa6 Mon Sep 17 00:00:00 2001 From: LilleAila Date: Fri, 17 Jan 2025 21:25:28 +0100 Subject: [PATCH] mini/visits: init --- docs/release-notes/rl-0.8.md | 1 + flake.lock | 17 +++++++++++++++++ flake.nix | 5 +++++ modules/plugins/mini/default.nix | 1 + modules/plugins/mini/visits/config.nix | 19 +++++++++++++++++++ modules/plugins/mini/visits/default.nix | 6 ++++++ modules/plugins/mini/visits/visits.nix | 13 +++++++++++++ 7 files changed, 62 insertions(+) create mode 100644 modules/plugins/mini/visits/config.nix create mode 100644 modules/plugins/mini/visits/default.nix create mode 100644 modules/plugins/mini/visits/visits.nix diff --git a/docs/release-notes/rl-0.8.md b/docs/release-notes/rl-0.8.md index 1d683202..421b7916 100644 --- a/docs/release-notes/rl-0.8.md +++ b/docs/release-notes/rl-0.8.md @@ -93,6 +93,7 @@ - `mini.tabline` - `mini.test` - `mini.trailspace` + - `mini.visits` [kaktu5](https://github.com/kaktu5): diff --git a/flake.lock b/flake.lock index c7a57499..148cc4e1 100644 --- a/flake.lock +++ b/flake.lock @@ -1560,6 +1560,22 @@ "type": "github" } }, + "plugin-mini-visits": { + "flake": false, + "locked": { + "lastModified": 1737036221, + "narHash": "sha256-Q+m1gZ5Obu6Zzo87Djt6VCX76ZjdOiLb0j771jP8uQE=", + "owner": "echasnovski", + "repo": "mini.visits", + "rev": "90f20ba6ab7d3d7cb984fffddd82f5f6c7a6bea7", + "type": "github" + }, + "original": { + "owner": "echasnovski", + "repo": "mini.visits", + "type": "github" + } + }, "plugin-minimap-vim": { "flake": false, "locked": { @@ -2795,6 +2811,7 @@ "plugin-mini-tabline": "plugin-mini-tabline", "plugin-mini-test": "plugin-mini-test", "plugin-mini-trailspace": "plugin-mini-trailspace", + "plugin-mini-visits": "plugin-mini-visits", "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 106d2bdd..99eeada4 100644 --- a/flake.nix +++ b/flake.nix @@ -940,5 +940,10 @@ url = "github:echasnovski/mini.trailspace"; flake = false; }; + + plugin-mini-visits = { + url = "github:echasnovski/mini.visits"; + flake = false; + }; }; } diff --git a/modules/plugins/mini/default.nix b/modules/plugins/mini/default.nix index 89d28999..8f035285 100644 --- a/modules/plugins/mini/default.nix +++ b/modules/plugins/mini/default.nix @@ -39,5 +39,6 @@ ./tabline ./test ./trailspace + ./visits ]; } diff --git a/modules/plugins/mini/visits/config.nix b/modules/plugins/mini/visits/config.nix new file mode 100644 index 00000000..424a81c2 --- /dev/null +++ b/modules/plugins/mini/visits/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.visits; +in { + vim = mkIf cfg.enable { + startPlugins = ["mini-visits"]; + + pluginRC.mini-visits = entryAnywhere '' + require("mini.visits").setup(${toLuaObject cfg.setupOpts}) + ''; + }; +} diff --git a/modules/plugins/mini/visits/default.nix b/modules/plugins/mini/visits/default.nix new file mode 100644 index 00000000..192eca9e --- /dev/null +++ b/modules/plugins/mini/visits/default.nix @@ -0,0 +1,6 @@ +{ + imports = [ + ./visits.nix + ./config.nix + ]; +} diff --git a/modules/plugins/mini/visits/visits.nix b/modules/plugins/mini/visits/visits.nix new file mode 100644 index 00000000..0560533e --- /dev/null +++ b/modules/plugins/mini/visits/visits.nix @@ -0,0 +1,13 @@ +{ + config, + lib, + ... +}: let + inherit (lib.options) mkEnableOption mkOption; + inherit (lib.nvim.types) mkPluginSetupOption; +in { + options.vim.mini.visits = { + enable = mkEnableOption "mini.visits"; + setupOpts = mkPluginSetupOption "mini.visits" {}; + }; +}