From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Dmitry Gutov Newsgroups: gmane.emacs.devel Subject: Re: treesit indentation "blinking" Date: Thu, 23 Mar 2023 23:24:40 +0200 Message-ID: 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> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="38768"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.8.0 Cc: emacs-devel@gnu.org To: Daniel Colascione , Yuan Fu Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Thu Mar 23 22:25:31 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 1pfSR8-0009u7-UE for ged-emacs-devel@m.gmane-mx.org; Thu, 23 Mar 2023 22:25:30 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pfSQT-0007Wz-1O; Thu, 23 Mar 2023 17:24:49 -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 1pfSQR-0007WI-0b for emacs-devel@gnu.org; Thu, 23 Mar 2023 17:24:47 -0400 Original-Received: from mail-ed1-x532.google.com ([2a00:1450:4864:20::532]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pfSQP-0001MX-7i for emacs-devel@gnu.org; Thu, 23 Mar 2023 17:24:46 -0400 Original-Received: by mail-ed1-x532.google.com with SMTP id t10so406937edd.12 for ; Thu, 23 Mar 2023 14:24:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; t=1679606683; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :sender:from:to:cc:subject:date:message-id:reply-to; bh=c8B2Hfpvv1RFGp6NjDrqwITDJCqO6TB8NOROW6R7Us0=; b=cOOpsiOhJ9bhJKbUHEWA0AwNd/g643lsUFAqcTCSPcpkJjRH0XTgVGgWnA4wEegeOD 6uRitWzMuWVmZweYqJqQ/hs8m0aiG8a90fKQTVi/BcKtFujov7Jz7jM2elz1pZ8sf6A0 vZPqEcKVv9NR6lUChZvsoLA5pJwSc2L4tIvYrlWj/8CkE2SMHlzYvLVWLQZ94USYCprz aNNWUiFS/UFC3SIvDVX+lJNx4ZywCNF7KwwrVGCXkqS4kLaC3Iwsfd+C24VOHSZGjeBc QsxXce4N1swQhoNPG+2OSZN9mB2hmbragnTLYKJzEVVsHNWnsXMjFdvguEdYgvMaO4CN uCdA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1679606683; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :sender:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=c8B2Hfpvv1RFGp6NjDrqwITDJCqO6TB8NOROW6R7Us0=; b=NZ+C64kpLpwvXDe0JzB3DiT7zATkioVBA1BOFqKyTgOPm0r86iO4tRsYk2Tci1dg32 cvqJZmOQGSSXAnEZmcTyaV1C9k/MobiDFiO3h3Dif8pdO0vA4dL29DT1tkMJvMUAdiIi TRjBWWA59wRfRgJXOwY7Y6Mx5J4NSrv+Tu7zQogcIbu/6eIUiBJ4D6SMjsJCiBW9ylWM mec4xDYN0HhcQ0Z6X29eScQKW6JPCCnz893Y9Fvwo+HeaPQFpEpY9RYgMFALayUCE582 L/NEG7hcNy4V1cuxjhBuA+O9LJJsGtQEjyTdWZEAuY53MLsS25eFYD3nspM9V4qpp5TR M7+g== X-Gm-Message-State: AAQBX9dPye9g+gLfaTfAiVCeql/Fvecwp73vUhOYe4X7lJzrkfU2N1yX sarJS7eVwyL2RBQIpGDmoEmBNaBRD6Eo2g== X-Google-Smtp-Source: AKy350bs5O+WlGzNq1UwVBoUdLiKErZa80R5PgHl8ibybMj0l4Z0B+p71fZk9w8/KR5Ezjh6l7thrA== X-Received: by 2002:a17:906:eb8d:b0:8b1:76ca:f228 with SMTP id mh13-20020a170906eb8d00b008b176caf228mr391351ejb.39.1679606683195; Thu, 23 Mar 2023 14:24:43 -0700 (PDT) Original-Received: from [192.168.0.2] ([85.132.229.92]) by smtp.googlemail.com with ESMTPSA id h27-20020a17090634db00b00933f31034f2sm6412538ejb.38.2023.03.23.14.24.42 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 23 Mar 2023 14:24:42 -0700 (PDT) Content-Language: en-US In-Reply-To: <187104f6b48.2829.cc5b3318d7e9908e2c46732289705cb0@dancol.org> Received-SPF: pass client-ip=2a00:1450:4864:20::532; envelope-from=raaahh@gmail.com; helo=mail-ed1-x532.google.com X-Spam_score_int: -14 X-Spam_score: -1.5 X-Spam_bar: - X-Spam_report: (-1.5 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FORGED_FROMDOMAIN=0.25, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.25, NICE_REPLY_A=-0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no 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:304742 Archived-At: On 23/03/2023 23:10, Daniel Colascione wrote: > Editing can cause all sorts of transient nonsense in the AST, and it's > impossible to predict in a general manner what this nonsense might be. > The wrong kind of bracket can cause the entire rest of the file to be > parsed as nonsense. This or that error recovery rule isn't going to > solve the problem: such a strategy is a fragile whack a mole. There > needs to be some general solution to prevent indentation blinking. This > blinking makes TS modules unusable for me. It seems to me it will only be feasible to support a number of "incomplete" syntax constructs. Maybe it will constitute a majority of them. Have you tried using electric-pair-mode, though? I'd hate to make it our strong recommendation for all ts modes, but it does reduce the odds of incomplete code a lot.