emacs-devel
[Top][All Lists]
Advanced

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

Re: treesit indentation "blinking"


From: Eli Zaretskii
Subject: Re: treesit indentation "blinking"
Date: Sat, 25 Mar 2023 17:42:41 +0300

> Date: Sat, 25 Mar 2023 14:42:50 +0200
> Cc: Daniel Colascione <dancol@dancol.org>, Yuan Fu <casouri@gmail.com>,
>  emacs-devel@gnu.org
> From: Dmitry Gutov <dgutov@yandex.ru>
> 
> > I don't think this problem has anything to do with tree-sitter.  It
> > would happen just as well in regular c++-mode if electric-indent-mode
> > were on by default there (but it isn't).
> 
> The mode is globally on by default, but indeed the contents of 
> electric-indent-chars are much shorter there.
> 
> > So it's just the fact that electric-indent-mode is on by default
> > _and_ c-ts-mode.el does this:
> > 
> > (setq-local electric-indent-chars (append "{}():;,#" electric-indent-chars))
> > 
> > so people are getting what the mode author (and Emacs defaults) ask for:
> > electric indentation doing its thing.
> 
> Good point: perhaps either this list should be revisited, or predicated 
> (at runtime) somehow on electric-pair-mode being enabled.

Maybe the list of electric characters should be a defcustom?



reply via email to

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