diff options
author | Jefferson González <jgmdev@gmail.com> | 2022-09-10 20:15:36 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-09-10 20:15:36 -0400 |
commit | 9def8a1b4928a5f22b1052db5533369784c1f140 (patch) | |
tree | 5476304bad8a378b6e7b3ecb842748ddb1e0e718 /plugins | |
parent | fe3eecc3b8967b4b61b9cac9c028e07665a75cb0 (diff) | |
parent | fbd54236151795f7a61a7f87e82f3eef3c3fea16 (diff) | |
download | lite-xl-plugins-9def8a1b4928a5f22b1052db5533369784c1f140.tar.gz lite-xl-plugins-9def8a1b4928a5f22b1052db5533369784c1f140.zip |
Merge pull request #120 from AqilCont/2.1
rainbowparens.lua: Added an option for number of parens
Diffstat (limited to 'plugins')
-rw-r--r-- | plugins/rainbowparen.lua | 5 |
1 files 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) |