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: Tree-sitter indentation for js-mode & cc-mode Date: Fri, 28 Oct 2022 23:54:18 -0700 Message-ID: <27A8C61B-FF54-49B9-9EF4-D1F2F79F30C9@gmail.com> References: <9AF8BFDC-C9A2-4AE5-A8D2-E6AA05DA3C91@gmail.com> <87k04lljh6.fsf@thornhill.no> <541CF451-6FAC-4531-A8AF-8C86FBB9D40B@thornhill.no> <425E0075-3F44-4832-BA2E-61E7D0A26FF4@gmail.com> <87mt9ggvph.fsf@thornhill.no> <89721927-13CE-4A65-944C-0DC924127373@gmail.com> <834jvnjhuj.fsf@gnu.org> Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3696.120.41.1.1\)) Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="2186"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Theodor Thornhill , emacs-devel , monnier@iro.umontreal.ca To: Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Sat Oct 29 09:10:47 2022 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 1oofzT-0000Ni-27 for ged-emacs-devel@m.gmane-mx.org; Sat, 29 Oct 2022 09:10:47 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oofyr-0005Ic-4g; Sat, 29 Oct 2022 03:10:10 -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 1oofjc-000671-8D for emacs-devel@gnu.org; Sat, 29 Oct 2022 02:54:24 -0400 Original-Received: from mail-pf1-x429.google.com ([2607:f8b0:4864:20::429]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oofja-0005C3-Lz; Sat, 29 Oct 2022 02:54:23 -0400 Original-Received: by mail-pf1-x429.google.com with SMTP id e4so6571432pfl.2; Fri, 28 Oct 2022 23:54:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; 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=RNT3BwIIJaOoc0HRM+EBCKI633+5OP4Hob2jSifAjCk=; b=n7/gJkV0aXSYvb5Ljh14A0VPBIEYTvM2iYbmDTl4qG3qzbVg6i4JSFvZnO+JVFxRJa l6443lP+lwDQZ0lUxCicZbimT8jz4PVIsGnxr9AZvHV3e3Xmljgo3GNOVqWTysveR/8Y rpnBqwrGQgyqrDW9J9HacnFmUBI0qCGI7gq5VBlHMaqLLxIZ1Z3e2v/IPK4oI/Z1kUs0 rWAY0a79V0dVZGFXZW+FHuTIEHLNgf+t20PF/lImbMcmYzyOmZ35FuI/1OhMfSwvvigf VubjkT8gY4qYRKE6pBq9OEtfQf6zcNYN5MSPOJyMH5ZGI0xfcBVaHw12GmKvt6t/iqwH 1IgQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; 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=RNT3BwIIJaOoc0HRM+EBCKI633+5OP4Hob2jSifAjCk=; b=17Pb6sqv0sM1Nt8pSGOWc5HQUUUqGp/4n5ELP5uFDb/zb6QGNdWIZGQGqbRC0IISZ6 TlNBRpRfOtzzXNnjY6UI059s5c3qSmKYNoAd9JL9cUM7SsJAe/FUrg+s5MyatCoT0SUn bCoGbMX9XOHgySTJLfyJRRg14RO6EYKiXA3wA03/ry/44pa0e6e3mEwKtanqXbvIyXs6 eVlgM0IkwnJ6d3COFDX2I5OW2DCY5rFTckTc9hThAKMyt/qrpAeOSc5dZfMBgEp5Ayl2 GF1nVLqJXx/6mhlDy0bBXiWjJWsAt85lPeDKrOo8IoD15BVPdp2WpCs+mJ0XhB1QO6Yy cTWQ== X-Gm-Message-State: ACrzQf28n++sbIzEaB5AIvMefT7d5oRKjn34zCoiM6uWuSmg2uEvo2WD +OSJMccGBdXnhElUJMouhIFMrCXbuMHvdA== X-Google-Smtp-Source: AMsMyM5VJIgezaWbrCHBpZ5gIXLYI458yPRd/YMbxT4reoHnP3tTeH9pSINWqrWX7G//kA3bTZUbCQ== X-Received: by 2002:a63:1e56:0:b0:462:970:e0de with SMTP id p22-20020a631e56000000b004620970e0demr3066001pgm.90.1667026460324; Fri, 28 Oct 2022 23:54:20 -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 o125-20020a625a83000000b00560e5da42d5sm520494pfb.201.2022.10.28.23.54.19 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Fri, 28 Oct 2022 23:54:20 -0700 (PDT) In-Reply-To: <834jvnjhuj.fsf@gnu.org> X-Mailer: Apple Mail (2.3696.120.41.1.1) Received-SPF: pass client-ip=2607:f8b0:4864:20::429; envelope-from=casouri@gmail.com; helo=mail-pf1-x429.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: , Original-Sender: "Emacs-devel" Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.devel:298726 Archived-At: > On Oct 28, 2022, at 10:53 PM, Eli Zaretskii wrote: >=20 >> From: Yuan Fu >> Date: Fri, 28 Oct 2022 12:43:31 -0700 >> Cc: emacs-devel , >> Stefan Monnier >>=20 >> Tree-sitter indent should add an implementation for indent-for-region = function which precomputes indent for each line and indent lines in = batch. That ought to fix it. Added to TODO :-) >=20 > I think this conclusion should be also in the manual, where we > describe how to provide indentation capabilities based on tree-sitter? Ah, yes, thanks for reminding me. I have some new things to add to the = major modes section (and some to remove). Yuan=