Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Suggestion: Rainbow Braces option: separate nesting per types #306

Open
amirea opened this issue Mar 25, 2021 · 1 comment
Open

Suggestion: Rainbow Braces option: separate nesting per types #306

amirea opened this issue Mar 25, 2021 · 1 comment

Comments

@amirea
Copy link

amirea commented Mar 25, 2021

Hello and thank you for this project. Not just a polite thanks but a warm one. It goes a long way in code readability. It helps a lot.

About the suggestion, I noticed in my code some classes curly braces had all a color and other classes in other file had all another color. I found it awkward and a bit distracting. Then I realized the classes in the first case resided in a namespace.

So may I suggest adding an option so that nesting takes into account just the same brace type?
This way, some confusion is avoided. For example:
Say you have two algorithms with nested parentheses, very similar but one is inside a block and the other is inside a nested block. Comparing the algorithms is more difficult with 2 different sets of colors.
Another side of the same issue: you get accustomed to how your code looks like, see a particular expression enclosed in green parentheses but the next day the green ones contain a larger expression because you moved the whole code into a block or class or namespace.

Another benefit of separate nesting is that nested parentheses which are the most nested occurrence is isolated, leaving the rest of the code neater.

Reading through the issues in this git I found out that some of them kind of relate:

Add support to color selected kinds of braces #293
If nesting is separate by type/kind, adding a enable/disable option for each would may be easier to implement?

Feature Request, C#: Provide option to disable brace matching at namespace/class level #204
Without using semantics, my suggestion would kind of alleviate much of the visual issue.

Can I disable rainbow coloring for square brackets? #278
This would be solved in the same manner as #293

@tomasr
Copy link
Owner

tomasr commented May 5, 2022

There's an "Rainbow Coring Mode == PerBrace" option. Would that maybe help here?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants