From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Yuan Fu Newsgroups: gmane.emacs.devel Subject: Re: treesit indentation "blinking" Date: Wed, 22 Mar 2023 17:00:11 -0700 Message-ID: <0F406D08-56D4-4B21-B94D-A47681606911@gmail.com> References: <87h6ucik61.fsf@dancol.org> Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3731.400.51.1.1\)) Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="37881"; mail-complaints-to="usenet@ciao.gmane.io" Cc: emacs-devel@gnu.org To: Daniel Colascione Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Thu Mar 23 01:00:58 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 1pf8O2-0009d1-LA for ged-emacs-devel@m.gmane-mx.org; Thu, 23 Mar 2023 01:00:58 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pf8Na-0008Eh-Tn; Wed, 22 Mar 2023 20:00:30 -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 1pf8NZ-0008EW-90 for emacs-devel@gnu.org; Wed, 22 Mar 2023 20:00:29 -0400 Original-Received: from mail-pl1-x62c.google.com ([2607:f8b0:4864:20::62c]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pf8NU-0001Ez-Eh for emacs-devel@gnu.org; Wed, 22 Mar 2023 20:00:28 -0400 Original-Received: by mail-pl1-x62c.google.com with SMTP id iw3so20780223plb.6 for ; Wed, 22 Mar 2023 17:00:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; t=1679529622; h=to:references:message-id:content-transfer-encoding:cc:date :in-reply-to:from:subject:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=cbpgjtvMji+5r/aWtDB6qjxspRtWMmS9sOUZYKBVyyM=; b=U0h13oX2ODYJgmNVOj3G3tboGUjQDIskHUHX9xyUgJgeBxg4D03v//o0bCIqCqEv1c Paj1CZPWVGqRlSGnyNYeVgUzbiy4SHOhysGW97loYFIMDY1cJ8MBWbzjuMTziYwWi8wr bBnSFr2NQ6Ep5PvZDIcvkpwoUyBrTYu2pDw9v5G2yuvk/a6AhIvtcrejEv5dtuox8sxu 7ODzr4cPX092qNvSQ9yMOWHDVPRp/uCAeZl4rya8q++TVHtNlwZ7kunw26pHGtTQjNnA eKOy9wnzEa3pbLjYdY47NgLftFbcODgGQAAEkCz3z3oU4bjdDMcB6hWMJizotyAMghwq n1YA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1679529622; h=to:references:message-id:content-transfer-encoding:cc:date :in-reply-to:from:subject:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=cbpgjtvMji+5r/aWtDB6qjxspRtWMmS9sOUZYKBVyyM=; b=MDT/sPfcnjDJjaGYDm2Q3w6MkB34a+fAp3ajF4JmmmbAz+gKnDibzJq82At/PepEIK 0DtCEeB7hoEUS0DxIpQRQrRtLPGyq3nCojNqwa4FuoeFtNKFaZERNWa3g6EfJi0LoKvm d/t1CHHHSP5SLIz7t/fTnrWXs1q0qs42c2jIv3RoHb2fgTTWQk8GkFSsddS4Qz8IvOWC ImoenDYu1r6l89mvkjdQBt/ZBf0gxhbuGNlsOCZ0/zwtRINl8mjfI+4yhOv87yhVJI7P ZjOcFliA7GXsloEXCCgVDwGMy7yN0pVanyLkFxvBMJIwjl1xy+UgEdetQTVt83spLOm0 dVuw== X-Gm-Message-State: AO0yUKU7j933fKPFZfIzTRuaoCdQUzIzbsmMgDtLQWVCtDE5YphSob6l 5Ni4wNdxTz7dJqji6AzXG7Q= X-Google-Smtp-Source: AK7set8MLK1ndu4aVxcLfS6R1RdNcvZiCinylzVb0ueRCio5vXI3E4z6xSWcEwkNs192+vma6mFF0g== X-Received: by 2002:a17:902:c793:b0:199:1996:71ec with SMTP id w19-20020a170902c79300b00199199671ecmr3574129pla.16.1679529622596; Wed, 22 Mar 2023 17:00:22 -0700 (PDT) Original-Received: from smtpclient.apple (cpe-172-117-161-177.socal.res.rr.com. [172.117.161.177]) by smtp.gmail.com with ESMTPSA id i2-20020a1709026ac200b0019a7c890c5asm5772129plt.263.2023.03.22.17.00.22 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Wed, 22 Mar 2023 17:00:22 -0700 (PDT) In-Reply-To: <87h6ucik61.fsf@dancol.org> X-Mailer: Apple Mail (2.3731.400.51.1.1) Received-SPF: pass client-ip=2607:f8b0:4864:20::62c; envelope-from=casouri@gmail.com; helo=mail-pl1-x62c.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action 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:304724 Archived-At: > On Mar 22, 2023, at 1:49 PM, Daniel Colascione = wrote: >=20 > Is there a general-purpose through which we can avoid line indentation > oscillating as the user types when the AST is temporarily invalid, > e.g. after '(' or '{'? I'm checking out the C++ tree-sitter mode, and > one of the more disconcerting things is the current line's indentation > changing rapidly as I type. Is it feasible to create ERROR recovery > indentation rules for every conceivable situation? >=20 Yes, but in reality, I think all we need is a couple special case for = the unmatched ( and {=E2=80=99s. Can you think of other cases of = blinking indentations? Yuan=