Skip to content

Option for brace based coloring #44

Description

@GafgarD

I moved this to github as you asked. Though best to include the whole original message with just a bit more details as context.

Would there be any chance that an option to optionally set a start and end brace symbol, similar to how you set the space size, could be added? I would suggest that one define pairs of braces in a string. Separated by white space. So it could be just "{}", but also "{} () <>" to handle 3 pair of braces.

I feel like it could be made to work much more reliably on a large set of very common languages than just using spaces. Things like Rainbow Braces works really great by doing this, but I just like the much larger and clearer colors of this extention specifically.

As some context and motivation for why this is important and matters. If it is just relying on the white space and not the code logic, it makes it potentially misleading if there are mistakes. Meaning, the actual logic of the code and the visualization is not in sync. Which might end up wasting time when looking for bugs/errors. A tool that works 99% of the time but silently fail the 1% can be quite problematic. So I feel a little hesitant to actually use this extension as it is.

I understand it's a large ask though. I just felt like it was better to give the feedback than not saying anything.

Btw, the extention visafora has highlighting of the current scope by adding a line. Which works for both inline scopes, regular properly indented scopes, but also for scopes with bad indentation. I feel like that solution for how they decide to draw the line could be quite relevant for how the colored borders would be drawn too. But, it does not need to be as advanced as that in a first iteration. But I think it could be of interest.

In either case, thanks for all the effort!

(if I find time, I could try to have a look at the git hub code here to have some more concrete suggestions, but I will probably not be able to do that for some time.)

Metadata

Metadata

Assignees

No one assigned

    Labels

    multi-line-contextRequires handling of state spanning multiple lines which requires more development work.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions