From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: treesit indentation "blinking" Date: Sun, 02 Apr 2023 08:31:41 +0300 Message-ID: <834jpyyhmq.fsf@gnu.org> References: <87h6ucik61.fsf@dancol.org> <0F406D08-56D4-4B21-B94D-A47681606911@gmail.com> <1870bcadd28.2829.cc5b3318d7e9908e2c46732289705cb0@dancol.org> <1870cce6690.2829.cc5b3318d7e9908e2c46732289705cb0@dancol.org> <35A837A9-59B4-4F1F-A5FA-8483C8024D76@gmail.com> <187104f6b48.2829.cc5b3318d7e9908e2c46732289705cb0@dancol.org> <21d018e5-a730-12e3-f97c-fffa4f646ccf@yandex.ru> <83v8ioc2ou.fsf@gnu.org> <87sfdsx0r2.fsf@gmail.com> <87lejgsf0m.fsf@gmail.com> <83pm8s70o3.fsf@gnu.org> <83mt3u65vw.fsf@gnu.org> <87y1newqus.fsf@gmail.com> <83bkka5z7w.fsf@gnu.org> <871ql6a4d4.fsf@gmail.com> <83jzyy4776.fsf@gnu.org> <9F152CAA-6326-459F-84FF-87988B3A92B6@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="34714"; mail-complaints-to="usenet@ciao.gmane.io" Cc: theo@thornhill.no, geza.herman@gmail.com, dancol@dancol.org, emacs-devel@gnu.org To: Yuan Fu Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Sun Apr 02 07:32:14 2023 Return-path: Envelope-to: ged-emacs-devel@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1piqK5-0008nW-Fe for ged-emacs-devel@m.gmane-mx.org; Sun, 02 Apr 2023 07:32:13 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1piqJR-00046g-8z; Sun, 02 Apr 2023 01:31:33 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1piqJO-00045n-49 for emacs-devel@gnu.org; Sun, 02 Apr 2023 01:31:30 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1piqJJ-0002Bv-Iy; Sun, 02 Apr 2023 01:31:29 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-version:References:Subject:In-Reply-To:To:From: Date; bh=LNELcSL0Rwkzzo0RwquzaWdhMS1r6vCcrvVGk+3bdCQ=; b=QIOYylPK7kwSGb7TEwAG Xk7OucI3UUS9lz/ExZZ2Bs2trqiB9TVyYaRuoklDK7Beckcgci1EjvForTebLqJYMh+Wnu5WRSLuc /Q8o39ANofwwZgSPYf61j1mTXNQGQhQy5zTI0lBDP4TQHLp8mOFBRgSup0tkONhxwraMgc0fApw+Y B5AH5qo4WBJ0sM+/OTDKSnb1PuG/zobgMEQUGihhsfxp04WnnunOt8EHqH/ek58lGVhM4s+3SpV4S tdJxLAyz4jbnxBJuvOcOqXRqAK3hiqkKdEKVHml/xIXqiB3UD0JK0BjfY4k4cal0qwz6WSzqg+uUH u1/lz0aOdqcIrw==; Original-Received: from [87.69.77.57] (helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1piqJH-0008LJ-BN; Sun, 02 Apr 2023 01:31:25 -0400 In-Reply-To: <9F152CAA-6326-459F-84FF-87988B3A92B6@gmail.com> (message from Yuan Fu on Sat, 1 Apr 2023 18:49:46 -0700) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.devel:305032 Archived-At: > From: Yuan Fu > Date: Sat, 1 Apr 2023 18:49:46 -0700 > Cc: theodor thornhill , > geza.herman@gmail.com, > Daniel Colascione , > emacs-devel@gnu.org > > If you enable electric-pair-mode so that the brackets are always balanced, then both c-ts-mode and c++-ts-mode should work fine. > > Trying to solve this with heuristics is going against to grain, IMO. I think it’s acceptable to say that users of ts-modes should enabled electric-pair-mode, since it’s based on a parser, after all. I'm okay with that conclusion. An alternative is to use "C-c C-q" after typing the final brace.