Skip to content

Commit ed7f3cd

Browse files
committed
make paren matching highlight in a different background colour
1 parent ea25678 commit ed7f3cd

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

bpython/formatter.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@
6969
Punctuation: 'punctuation',
7070
Token: 'token',
7171
Whitespace: 'background',
72-
Parenthesis: 'keyword',
72+
Parenthesis: 'punctuation',
7373
}
7474

7575

@@ -91,6 +91,10 @@ def __init__(self, color_scheme, **options):
9191
if not self.f_strings:
9292
for k, v in theme_map.iteritems():
9393
self.f_strings[k] = '\x01%s' % (color_scheme[v],)
94+
if k is Parenthesis:
95+
# FIXME: Find a way to make this the inverse of the current
96+
# background colour
97+
self.f_strings[k] += 'w'
9498
Formatter.__init__(self, **options)
9599

96100
def format(self, tokensource, outfile):

0 commit comments

Comments
 (0)