From fbd54236151795f7a61a7f87e82f3eef3c3fea16 Mon Sep 17 00:00:00 2001 From: Aqil Contractor Date: Mon, 25 Jul 2022 16:26:25 -0400 Subject: Added an option for number of parens --- plugins/rainbowparen.lua | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/plugins/rainbowparen.lua b/plugins/rainbowparen.lua index 0f4c5c8..6ca4cb4 100644 --- a/plugins/rainbowparen.lua +++ b/plugins/rainbowparen.lua @@ -8,7 +8,8 @@ local tokenizer = require "core.tokenizer" local Highlighter = require "core.doc.highlighter" config.plugins.rainbowparen = common.merge({ - enabled = true + enabled = true, + parens = 5 }, config.plugins.rainbowparen) style.syntax.paren_unbalanced = style.syntax.paren_unbalanced or { common.color "#DC0408" } @@ -26,7 +27,7 @@ local closers = { } local function parenstyle(parenstack) - return "paren" .. ((#parenstack % 5) + 1) + return "paren" .. ((#parenstack % config.plugins.rainbowparen.parens) + 1) end function tokenizer.tokenize(syntax, text, state) -- cgit v1.2.3