jdtsmith / indent-bars

Fast, configurable indentation guide-bars for Emacs
GNU General Public License v3.0
272 stars 7 forks source link

Only show indent bars in current indentation depth? #23

Closed gnufied closed 9 months ago

gnufied commented 9 months ago

I was wondering if there is a way to ask indent-bars to only show indentation bars for current context. A bit like highlight-indentation-current-column-mode

jdtsmith commented 9 months ago

I forget how that works, can you show an image? I think that does basically the same thing as indent-bars-highlight-current-depth. Are you suggesting to highlight only lines with contiguous bars at the same depth, or not showing any bars at all except for those in some surrounding local block?

indent-bars uses face remapping for ~instant current depth highlight; highlight-indentation is much slower with this, probably because it scans and edits overlays on every keystroke. So any solution would need to retain that speed.

jdtsmith commented 9 months ago

Or maybe you are asking if it's possible at all. See indent-bars-highlight-current-depth.

gnufied commented 9 months ago

Here is what I meant btw - https://github.com/antonj/Highlight-Indentation-for-Emacs which has highlight-indentation-current-column-mode

I slightly prefer only showing indentation guides for current column because it looks less noisy. I will check indent-bars-highlight-current-depth and see if same thing is possible.

jdtsmith commented 9 months ago

That certainly can be achieved: the highlight bar is bright, others are faint. Just turn down the normal blend factor (towards 0) and have current highlight with a larger blend; check the color-pop example.