From dfd4dc8494be4f09076ce8b1239177c8a5d10420 Mon Sep 17 00:00:00 2001 From: LilleAila Date: Sun, 19 Jan 2025 12:52:45 +0100 Subject: [PATCH] visuals/rainbow-delimiters: init --- docs/release-notes/rl-0.8.md | 1 + flake.lock | 17 +++++++++++++++++ flake.nix | 5 +++++ modules/plugins/visuals/default.nix | 1 + .../visuals/rainbow-delimiters/config.nix | 18 ++++++++++++++++++ .../visuals/rainbow-delimiters/default.nix | 6 ++++++ .../rainbow-delimiters/rainbow-delimiters.nix | 13 +++++++++++++ 7 files changed, 61 insertions(+) create mode 100644 modules/plugins/visuals/rainbow-delimiters/config.nix create mode 100644 modules/plugins/visuals/rainbow-delimiters/default.nix create mode 100644 modules/plugins/visuals/rainbow-delimiters/rainbow-delimiters.nix diff --git a/docs/release-notes/rl-0.8.md b/docs/release-notes/rl-0.8.md index 42927bafc..a164d7764 100644 --- a/docs/release-notes/rl-0.8.md +++ b/docs/release-notes/rl-0.8.md @@ -102,6 +102,7 @@ - `mini.trailspace` - `mini.visits` - Add [fzf-lua](https://github.com/ibhagwan/fzf-lua) in `vim.fzf-lua` +- Add [rainbow-delimiters](https://github.com/HiPhish/rainbow-delimiters.nvim) in `vim.visuals.rainbow-delimiters` [kaktu5](https://github.com/kaktu5): diff --git a/flake.lock b/flake.lock index 7b7f0bab6..c328bda1d 100644 --- a/flake.lock +++ b/flake.lock @@ -2361,6 +2361,22 @@ "type": "github" } }, + "plugin-rainbow-delimiters": { + "flake": false, + "locked": { + "lastModified": 1736686348, + "narHash": "sha256-zWHXYs3XdnoszqOFY3hA2L5mNn1a44OAeKv3lL3EMEw=", + "owner": "HiPhish", + "repo": "rainbow-delimiters.nvim", + "rev": "85b80abaa09cbbc039e3095b2f515b3cf8cadd11", + "type": "github" + }, + "original": { + "owner": "HiPhish", + "repo": "rainbow-delimiters.nvim", + "type": "github" + } + }, "plugin-registers": { "flake": false, "locked": { @@ -2893,6 +2909,7 @@ "plugin-precognition-nvim": "plugin-precognition-nvim", "plugin-project-nvim": "plugin-project-nvim", "plugin-promise-async": "plugin-promise-async", + "plugin-rainbow-delimiters": "plugin-rainbow-delimiters", "plugin-registers": "plugin-registers", "plugin-render-markdown-nvim": "plugin-render-markdown-nvim", "plugin-rose-pine": "plugin-rose-pine", diff --git a/flake.nix b/flake.nix index 05b6fc4b6..5d4728f66 100644 --- a/flake.nix +++ b/flake.nix @@ -502,6 +502,11 @@ flake = false; }; + plugin-rainbow-delimiters = { + url = "github:HiPhish/rainbow-delimiters.nvim"; + flake = false; + }; + # Minimap plugin-minimap-vim = { url = "github:wfxr/minimap.vim"; diff --git a/modules/plugins/visuals/default.nix b/modules/plugins/visuals/default.nix index 0843654e3..3a44aa45f 100644 --- a/modules/plugins/visuals/default.nix +++ b/modules/plugins/visuals/default.nix @@ -15,6 +15,7 @@ in { ./nvim-cursorline ./nvim-scrollbar ./nvim-web-devicons + ./rainbow-delimiters ./tiny-devicons-auto-colors ]; } diff --git a/modules/plugins/visuals/rainbow-delimiters/config.nix b/modules/plugins/visuals/rainbow-delimiters/config.nix new file mode 100644 index 000000000..361a04267 --- /dev/null +++ b/modules/plugins/visuals/rainbow-delimiters/config.nix @@ -0,0 +1,18 @@ +{ + config, + lib, + ... +}: let + inherit (lib.modules) mkIf; + inherit (lib.nvim.dag) entryAnywhere; + inherit (lib.nvim.lua) toLuaObject; + cfg = config.vim.visuals.rainbow-delimiters; +in { + vim = mkIf cfg.enable { + startPlugins = ["rainbow-delimiters"]; + + pluginRC.rainbow-delimiters = entryAnywhere '' + vim.g.rainbow_delimiters = ${toLuaObject cfg.setupOpts} + ''; + }; +} diff --git a/modules/plugins/visuals/rainbow-delimiters/default.nix b/modules/plugins/visuals/rainbow-delimiters/default.nix new file mode 100644 index 000000000..50aaad0ed --- /dev/null +++ b/modules/plugins/visuals/rainbow-delimiters/default.nix @@ -0,0 +1,6 @@ +{ + imports = [ + ./rainbow-delimiters.nix + ./config.nix + ]; +} diff --git a/modules/plugins/visuals/rainbow-delimiters/rainbow-delimiters.nix b/modules/plugins/visuals/rainbow-delimiters/rainbow-delimiters.nix new file mode 100644 index 000000000..3fed4a646 --- /dev/null +++ b/modules/plugins/visuals/rainbow-delimiters/rainbow-delimiters.nix @@ -0,0 +1,13 @@ +{ + config, + lib, + ... +}: let + inherit (lib.options) mkEnableOption; + inherit (lib.nvim.types) mkPluginSetupOption; +in { + options.vim.visuals.rainbow-delimiters = { + enable = mkEnableOption "rainbow-delimiters"; + setupOpts = mkPluginSetupOption "rainbow-delimiters" {}; + }; +}