Multi-color indent guide lines


#1

Hello!

I am curious if Atom has support, or plans to support, for multi color or tone indent guide lines. For example, in my Sublime editor I have indent guides on. The most indented guide is a brighter grey, whereas the less indented guide lines are a darker grey.

If this does exist, could someone point me in the right direction to changing this?

Thank you!


#2

you can style that yourself, in your ~/.atom/styles.less file, do something like

.editor .indent-guide {
    color: #000;
}

.editor .indent-guide:last-child {
    color: #FFF;
}

#3

It’s a start, thank you! I can at least make the guides not blind me in Sunburst.


#4

The indent-guides are created with a box-shadow, so you’d have to do

.indent-guide {
  box-shadow: 1px 0 white;

  &:last-child {
    box-shadow: 1px 0 red;
  }
}

Color current indent guide differently
#5

And if you can live with a fixed depth you can do something like this (color, box-shadow or whatever):

.editor {

.indent-guide {

    // first level
    color: rgb(255, 255, 255);

    // second level
    &:nth-child(2) {
        color: rgb(180, 180, 180);
    }

    // third level
    &:nth-child(3) {
        color: rgb(105, 105, 105);
    }

    // fourth level
    &:nth-child(4) {
        color: rgb(30, 30, 30);
    }

}

}


#6

Changing the color attribute works also. If a color isn’t explicitly set in the box-shadow rule, it falls back to the color of the text.