Author Topic: Scoped highlighting / coloring  (Read 145 times)

jporkkahtc

  • Senior Community Member
  • Posts: 1199
  • Hero Points: 87
  • Text
Scoped highlighting / coloring
« on: December 15, 2016, 08:18:58 pm »
A often requested feature is for slick to draw scope lines. (Selective display Bracketing is an attempt at this).

While this would be nice, lets do one better.
Color the current scope white, and each parent nested scope progressively darker.

Attached is a simple mock up, though word/onenote don't let you customize background colors so its hard to get this to look exactly right with progressively lighter background colors.

This could be done in editor windows, but also in other places where it makes sense.
Defs, projects, even smart-open (each folder, recursively), search results (coloring each file differently?)

Pros: Wow that would be really cool!

Cons:
I imagine there would be some perf hit, recoloring the whole window as the cursor moves up and down, but it shouldn't be too bad since slick would already know the scopes (due to the scope line future feature), and would only have to color the current window.

Worse, if there is too much difference in brightness between depths it might cause too much flickering with so much dynamic recoloring.

Limiting this to non-editor windows would reduce both the perf hit and the flickering.

The coloring could also be limited to the scope lines instead of the entire width of the buffer.

Interference with other coloring features that can affect the text background colors.