From d7ca0f11bd7fe43029cba29caffbe35e6844c63c Mon Sep 17 00:00:00 2001 From: Silzinc Date: Sat, 14 Dec 2024 19:46:29 +0100 Subject: [PATCH 1/2] feat: add support for rainbow-delimiters --- doc/nightfox.txt | 11 +++++----- lua/nightfox/config.lua | 1 + .../group/modules/rainbow-delimiters.lua | 20 +++++++++++++++++++ usage.md | 1 + 4 files changed, 28 insertions(+), 5 deletions(-) create mode 100644 lua/nightfox/group/modules/rainbow-delimiters.lua diff --git a/doc/nightfox.txt b/doc/nightfox.txt index 91681ea2..8b2900a9 100644 --- a/doc/nightfox.txt +++ b/doc/nightfox.txt @@ -167,7 +167,7 @@ Note: If the resulting value of a template is a |nightfox-shade| then the -- Value does not start with `#` so is treated as a template. -- Since `magenta` is a `shade` object the `base` value will be used. keyword = "magenta", - + -- Adding either `.bright` or `.dim` will change the value conditional = "magenta.bright", number = "orange.dim", @@ -178,22 +178,22 @@ Note: If the resulting value of a template is a |nightfox-shade| then the } } } - + -- Groups use specs as the template source local groups = { all = { -- The template path is parsed to [`syntax`, `string`]. This is like calling into a lua table like: -- `spec.syntax.string`. String = { fg = "syntax.string" }, - + -- If `link` is defined it will be applied over any other values defined Whitespace = { link = "Comment" } - + -- Specs are used for the template. Specs have their palette's as a field that can be accessed IncSearch = { bg = "palette.cyan" }, }, } - + require('nightfox').setup({ specs = specs, groups = groups }) < @@ -529,6 +529,7 @@ Current list of modules are: - notify - nvimtree - pounce +- rainbow-delimiters - signify - sneak - symbol_outline diff --git a/lua/nightfox/config.lua b/lua/nightfox/config.lua index cba4b03a..cc5c004d 100644 --- a/lua/nightfox/config.lua +++ b/lua/nightfox/config.lua @@ -97,6 +97,7 @@ M.module_names = { "signify", "sneak", "symbol_outline", + "rainbow-delimiters", "telescope", "treesitter", "tsrainbow", diff --git a/lua/nightfox/group/modules/rainbow-delimiters.lua b/lua/nightfox/group/modules/rainbow-delimiters.lua new file mode 100644 index 00000000..81675a6e --- /dev/null +++ b/lua/nightfox/group/modules/rainbow-delimiters.lua @@ -0,0 +1,20 @@ +-- https://github.com/HiPhish/rainbow-delimiters.nvim + +local M = {} + +function M.get(spec, config, opts) + local c = spec.palette + + -- stylua: ignore + return { + RainbowDelimiterBlue = { fg = c.blue.base }, + RainbowDelimiterCyan = { fg = c.cyan.base }, + RainbowDelimiterGreen = { fg = c.green.base }, + RainbowDelimiterOrange = { fg = c.orange.base }, + RainbowDelimiterRed = { fg = c.red.base }, + RainbowDelimiterPurple = { fg = c.magenta.base }, + RainbowDelimiterYellow = { fg = c.yellow.base }, + } +end + +return M diff --git a/usage.md b/usage.md index 0f1e484e..98c0b54d 100644 --- a/usage.md +++ b/usage.md @@ -424,6 +424,7 @@ Current list of modules are: - signify - sneak - symbol_outline +- rainbow-delimiters - telescope - treesitter - tsrainbow From 0ad2132459b2ec17c203c721b6e1c843125e1ccb Mon Sep 17 00:00:00 2001 From: Silzinc Date: Sat, 14 Dec 2024 19:48:12 +0100 Subject: [PATCH 2/2] fix: forgot to update readme.md --- readme.md | 1 + 1 file changed, 1 insertion(+) diff --git a/readme.md b/readme.md index 84ca0cae..dfe6347b 100644 --- a/readme.md +++ b/readme.md @@ -541,6 +541,7 @@ There are a few things to note: - [pounce.nvim](https://github.com/rlane/pounce.nvim) - [vim-signify](https://github.com/mhinz/vim-signify) - [vim-sneak](https://github.com/justinmk/vim-sneak) +- [rainbow-delimiters](https://github.com/hiphish/rainbow-delimiters.nvim) - [symbols-outline.nvim](https://github.com/simrat39/symbols-outline.nvim) - [telescope.nvim](https://github.com/nvim-telescope/telescope.nvim) - [nvim-ts-rainbow](https://github.com/p00f/nvim-ts-rainbow)