Highlight unbalanced (open) parenthesis

Recently I saw a vid with an IDE called Thonny. Does anyone know how to highlight unbalanced (open) parenthesis as shown in the video? This looks like a good highlighter to have around, not just for parenthesis, but for all types of unbalanced brackets, single-quote, double-quotes, tripple-quotes etc.


IMO the highlighter in that video would have two many false positives if you used regex (Edit: assuming it’s always on), e.g.

["[", "hello", "world"]

I use this when I edit scheme/lisp, it highlights the brace pair surrounding the cursor and if you place the cursor on a brace it will show it’s pair. It still breaks on braces inside strings or comments but at least it’s a minor breakage.

1 Like