DONE: Colored indent blocks

Make a request or discuss new features.
Post Reply
User avatar
pjj
Posts: 2236
Joined: 13 Oct 2009 13:48
Location: Kraków, Poland

DONE: Colored indent blocks

Post by pjj »

Looking for indent lines in VSCode, I found this:

Image

It's seems like a good idea to me; can we have it, please? With an option similar to "Only show indent line on active node element", but working independently (i.e. indent lines for all nodes & indent blocks for active one.)
Alium tibi quaere fratrem; hic, quem tuum putas, meus est. Titus Flāvius Caesar Vespasiānus Augustus
User avatar
Rickard Johansson
Site Admin
Posts: 6783
Joined: 19 Jul 2006 14:29

Re: Colored indent blocks

Post by Rickard Johansson »

Maybe this should be independent of indent lines settings and always available as an option. Maybe named something like "structural highlighting"...

Anyway, I made an attempt at implementing it and this is the progress so far. I haven't added any options yet, and there are situations where it could look better (screenshot 2).

BlockHighlight.png
BlockHighlight.png (15.34 KiB) Viewed 2876 times

Brace highlighting using background color.

BlockHighlight2.png
BlockHighlight2.png (15.27 KiB) Viewed 2876 times
User avatar
Rickard Johansson
Site Admin
Posts: 6783
Joined: 19 Jul 2006 14:29

Re: Colored indent blocks

Post by Rickard Johansson »

Tried different things but I think this works the best...

indentGuide_bk1.png
indentGuide_bk1.png (25.16 KiB) Viewed 2852 times
indentGuide_bk2.png
indentGuide_bk2.png (26.61 KiB) Viewed 2852 times
indentGuide_square.png
indentGuide_square.png (26.5 KiB) Viewed 2852 times

The only "issue" right now is that the brace highlight color changes to the indent line color inside the indent block...
indentGuide_braces.png
indentGuide_braces.png (8.48 KiB) Viewed 2852 times
User avatar
Rickard Johansson
Site Admin
Posts: 6783
Joined: 19 Jul 2006 14:29

Re: Colored indent blocks

Post by Rickard Johansson »

Implemented in the next version with the following options:

structHighlightingOptions.png
structHighlightingOptions.png (7.67 KiB) Viewed 2703 times
User avatar
pjj
Posts: 2236
Joined: 13 Oct 2009 13:48
Location: Kraków, Poland

Re: DONE: Colored indent blocks

Post by pjj »

This looks great! :-D (Any chance for these color indent stripes? Perhaps in a later version?)
Alium tibi quaere fratrem; hic, quem tuum putas, meus est. Titus Flāvius Caesar Vespasiānus Augustus
Post Reply