diff --git a/docs/release-notes/rl-0.8.md b/docs/release-notes/rl-0.8.md index 3d7eebd3..c509d2c3 100644 --- a/docs/release-notes/rl-0.8.md +++ b/docs/release-notes/rl-0.8.md @@ -106,6 +106,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 7b7f0bab..c328bda1 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 05b6fc4b..5d4728f6 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 0843654e..3a44aa45 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 00000000..361a0426 --- /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 00000000..50aaad0e --- /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 00000000..3fed4a64 --- /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" {}; + }; +}