question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

More than 6 colors in Bracket Pair Colorization? (Rainbow?)

See original GitHub issue

Hi!

First of all I appreciate the work done to improve this feature and make it so much more performant 😃

Today I wanted to migrate to the new built-in bracket colorization feature but realized it doesn’t support the color options of the original plugin. As far as I understand the VS Code implementation supports up to 6 colors, but is there any reason not to support the array configuration of the original plugin?

It would be beautiful, so I can keep using my rainbow brackets with the added performance improvement! 😄

Here’s my config:

    "bracketPairColorizer.colorMode": "Consecutive",
    "bracketPairColorizer.showBracketsInRuler": true,
    "bracketPairColorizer.showBracketsInGutter": true,
    "bracketPairColorizer.consecutivePairColors": [
        "()",
        "[]",
        "{}",
        [
            "#ff0000",
            "#ff8000",
            "#ffbf00",
            "#ffff00",
            "#bfff00",
            "#00ff00",
            "#00ffbf",
            "#00ffff",
            "#00bfff",
            "#0080ff",
            "#0066ff",
            "#0000ff",
            "#8000ff",
            "#bf00ff",
            "#ff00ff",
            "#ff00bf",
            "#ff0080"
        ],
        "White"
    ],

And here’s the beautiful result: image

I would really appreciate this 👍🏻

Issue Analytics

  • State:open
  • Created 2 years ago
  • Reactions:14
  • Comments:20 (6 by maintainers)

github_iconTop GitHub Comments

2reactions
aviculariancommented, Jun 23, 2022

The colour scheme in the OP is beautiful—props for sharing!

Programming in highly nested languages like any Lisp, or Dart with Flutter, is painful without rainbow bracket colour schemes. More than 6 colours is a necessity. I usually use 20—and it makes the code much, much easier to write. This needless, arbitrary limitation has had so many of us tearing our hair out in frustration.

My kakoune editor can do this in a plug-in that takes roughly a page of code, why can’t the immensely popular VSCode?

Fix it. And please don’t overcomplicate things.

Add the following settings:

editorBracketHighlight.foreground1
editorBracketHighlight.foreground2
editorBracketHighlight.foreground3
editorBracketHighlight.foreground4
editorBracketHighlight.foreground5
editorBracketHighlight.foreground6
editorBracketHighlight.foreground7
editorBracketHighlight.foreground8
...
editorBracketHighlight.foreground18
editorBracketHighlight.foreground19
editorBracketHighlight.foreground20

Resolve the (tiresome, interminably complicated) issue about lists in setting files later. Add this simple, easy-to-implement functionality that users of nested languages are lacking now.

I’ll send the PR if that’s a problem.

1reaction
aviculariancommented, Dec 7, 2022

Again:

  • The limit is arbitrary
  • 6 colours is clearly not enough
  • Everyone who’s experienced writing with over 6 colours has much preferred it
  • It was in the original addon, which you effectively killed
  • The effort needed to add more colours is almost nil
  • It’s necessary for Flutter, Lisp, and similar highly nested programming systems (and no, being >6 layers deep does NOT mean your style is poor! No one would make the same claims about HTML, and Flutter is the same, a declarative system)

Oh well, due to the complete non-configurability of VSCode, and constant bad aesthetic decisions, I’ll be dropping it.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Bracket pair colorization 10000x faster - Visual Studio Code
How we made bracket pair colorization in Visual Studio Code up to 10000 times faster.
Read more >
Rainbow Colorized Brackets in Visual Studio | Blog - Ardalis
A popular extension and later core feature of VS Code, rainbow bracket colorization is now available as a free extension for Visual Studio....
Read more >
Native Bracket Pair Colourization in VS Code
VSCode now has bracket pair colorization natively baked in! ... All colors are themeable and up to six colors can be configured.
Read more >
Adding color to bracket pairs - Visual Studio Blog
We're starting out with an extension to kick off the experiment. We call it Rainbow Braces and the first iteration adds basic colorization...
Read more >
VS Code: You don't need that extension part 2 - Rob O'Leary
bracketPairColorization.enabled to true. demostration of bracket pair colorization for 6 indented levels. The bracket colors can be declared in ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found