[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: highlight-indent-guides in display engine

From: Ergus
Subject: Re: highlight-indent-guides in display engine
Date: Fri, 12 Jul 2019 12:36:09 +0200
User-agent: NeoMutt/20180716

On Fri, Jul 12, 2019 at 11:58:43AM +0200, Ergus wrote:
On Fri, Jul 12, 2019 at 09:57:24AM +0300, Eli Zaretskii wrote:
Date: Fri, 12 Jul 2019 02:21:27 +0200
From: Ergus <address@hidden>
Cc: address@hidden

I don't think I understand: what do you mean by "add the indicator"?
How would this indicator look like?

Maybe a vertical bar (like our previous column indicator) or a width
line. Or something customizable somehow. We just need to look around,
there are several alternatives. We must chose the one that fits better
and produces less complications for us. But provides the functionality

I don't thing how the indicator looks like may be a problem, but how
accurate or specific it behaves.

I am just looking around and Geany adds some vertical points as the
indicator positions (every tab or every x spaces). But the spaces are
only "indicated" when used for the indentation..

Sublime behaves in the same way. But there is an option to highlight the
indicator only in the blocks around the current cursor. (As in the

I didn't receive any attachments with your message.

Athom on the other hand seems to behave as in the
highlight-indent-guides.el package:

With the animations and so on. Which seems to be the most complete
behavior, but less efficient.

The animations and highlighting inside the current block should be in
Lisp, not in the display code.  If at all.

In all the cases I just see that they add the indicator based on the
characters between the beginning of the line and the indentation (first
non blank character) not looking at the previous lines. They ignore if
there is a previous line  with wrong indentation or if the current line
adds 3 tabs more respecting to the previous one.

So, implementing it in this way doesn't seems to be so complex right?

So basically you are talking about displaying some special glyph at
every tab stop inside leading whitespace of a line, or making each
tab-stop width have a different background color?  Yes, this should be
possible to do in the display code.  I just hope enough people will
see this as sufficient, because if most current users of these
packages won't switch, this new feature will not be worth its
development, documentation, and maintenance effort.  Maybe we should
ask on Reddit first?

Hi Eli:

I think several people will prefer to have the whole functionalities and
options to customize (as usual in emacs if there is a feature that
solves N issues, then somebody will come asking for the N+1 option.)

But in any case the minimal solution will be enough for a big number of
users if it compensates with performance.

But I agree that we must ask in reddit. May you please add a reddit
poster about?  Because as I don't use reddit very often, most users
ignore them.

Thanks in advance,


Thinking more about this, there is an important corner case with my
simplistic solution: Lisp.

While the simplest solution will work in most of the cases: the
more popular languages (C, C++, Java, PHP, Python, Rust, Ruby,
JavaScript), and others no so popular (Fortran, Lua, Assembler, Bash,
Go) because their indentation is very regular; the lisp indentation is
very different and irregular (As Emacs indents it, I don't know the
rules it follows).

So, the simplistic solution won't work at all for the Lisp (common-lisp,
Scheme, Elisp) family and may be even a nuisance when writing Lisp :(. I
don't find any other language family with the same issue, but probably
there are other examples

Any idea here?
At least for the lisp case?

reply via email to

[Prev in Thread] Current Thread [Next in Thread]