From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: chad Newsgroups: gmane.emacs.devel Subject: Re: Tree-sitter integration on feature/tree-sitter Date: Sun, 15 May 2022 15:20:18 -0400 Message-ID: References: <87y1zabmbt.fsf@gmail.com> <5F186EBD-CD21-422B-8B4F-0D5424173334@gmail.com> <875ymdwf76.fsf@gmail.com> <011DA1A3-0FA8-4449-878A-FD6B336B0F1B@gmail.com> Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="000000000000ffdb0605df11cce9" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="35154"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Yoav Marco , EMACS development team To: Yuan Fu Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Sun May 15 21:21:41 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 1nqJoC-000901-Ro for ged-emacs-devel@m.gmane-mx.org; Sun, 15 May 2022 21:21:40 +0200 Original-Received: from localhost ([::1]:36134 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nqJoB-0002KR-L6 for ged-emacs-devel@m.gmane-mx.org; Sun, 15 May 2022 15:21:39 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:51106) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nqJn9-0001Ys-Fk for emacs-devel@gnu.org; Sun, 15 May 2022 15:20:35 -0400 Original-Received: from mail-lf1-x134.google.com ([2a00:1450:4864:20::134]:43937) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nqJn6-0001iC-Pv for emacs-devel@gnu.org; Sun, 15 May 2022 15:20:35 -0400 Original-Received: by mail-lf1-x134.google.com with SMTP id p26so22515079lfh.10 for ; Sun, 15 May 2022 12:20:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=ephpH9JzBRVMimNQQtmul9ihBx6AnlBGgX+oPH95oI0=; b=M9Q3wv99pwWdPLF+BnDb9SxdTTfXbs9mKILdAaT3+HSmA6rQc53UwXlmdog/LDmJAR LuaoJAugzBNtZTMlyUPolxaomEgJwQqERkYdIcboc99kzqiFJhUtx2MfFx8fh3oRlTUF reosmC0yJnxZmhI3EsFaGPZqXt74XmXEXHbmaVVmc+kpxNFKJ18RPUwhGbRMpu12rYyo +uKI/lAXTxh+jkXCwB0qMA3MXi86UyvqXJGvsI9qPp84QevwsinJZ4t+++Gs/lYRQ3Lk tVk7hVm99aJgIAYIarFAwt9qqlfwikrt28MspDkz6Mvo3bM7XotY4LDMCmZx0vO4BW5A phoA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=ephpH9JzBRVMimNQQtmul9ihBx6AnlBGgX+oPH95oI0=; b=TS0v4E190IjELZd5aq6z8otGFOui3MXJNDum/1Rfx3Dht507+qRmspBWewAaxO3p6p MR0JkoZF1/WjMRFVR92KgDSmEfG/sM6JvfDZE9GeMTltrakcW/FTQuXZYNLZ7Rzboqv2 1VrMqAwFQKJEspOjVVk7rJzyFaDewvghSXet1eGn1pYT1vZZdR2yxkb6njIF1eHWkkBm ojMpccgTFwXkZhaU+89V0OIb/K5NN7/mN5M1zwiSWsQ8rwTlMA+tqDnE/H8cs8l+yWmz dMfPkXHMd5oC84JGS0LHkjMEgncjk9DYhJLSYzLyPvkeKdp9rfrlo4NlHQ43p3ILQOJY gGLQ== X-Gm-Message-State: AOAM533LWpwvwvArtCW7XW0eVPbAiYOMPteh1+RFCtb1/STIgWUfbzVQ XGno0t0C3uRBw/vWm5TZkbtEdxLIq6UqPzvvb9Q= X-Google-Smtp-Source: ABdhPJxPdNRPmjQiTG47pzKVsrmOOh7s6hMq+W6FfA98zUwc3Khro7/3jDvaOigGRfSoRDP6yWRnbLVwngyhhxboRfQ= X-Received: by 2002:a05:6512:31d6:b0:473:a0ce:581b with SMTP id j22-20020a05651231d600b00473a0ce581bmr10677399lfe.96.1652642430309; Sun, 15 May 2022 12:20:30 -0700 (PDT) In-Reply-To: <011DA1A3-0FA8-4449-878A-FD6B336B0F1B@gmail.com> Received-SPF: pass client-ip=2a00:1450:4864:20::134; envelope-from=yandros@gmail.com; helo=mail-lf1-x134.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, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 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" Xref: news.gmane.io gmane.emacs.devel:289796 Archived-At: --000000000000ffdb0605df11cce9 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Please forgive the late mid-thread reply; I was on the road. On Tue, May 10, 2022 at 1:56 PM Yuan Fu wrote: > Yeah using a single cache would probably result in a lot of misses since > Emacs don=E2=80=99t fontify the whole buffer at once. > While it's true that Emacs doesn't fontify whole buffers under the current scheme, based on what I've read of tree-sitter (caveat: a fairly long while back), I think it might be reasonable to move to a whole-buffer-and-repair strategy for emacs+treesit, and that might provide some nice simplification along the way. Is there a good way to try this strategy now? I avoid JS whenever possible, and that seems like it might be the current-best test case... Thanks, ~Chad --000000000000ffdb0605df11cce9 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Please forgive the late mid-thread reply;= I was on the road.=C2=A0

On Tue, May 10, 2022 at 1:56 PM Yuan Fu <casouri@gmail.com> wrote:
Yeah using a single cache w= ould probably result in a lot of misses since Emacs don=E2=80=99t fontify t= he whole buffer at once.=C2=A0

While it= 's true that Emacs doesn't fontify whole buffers under the current = scheme, based on what I've read of tree-sitter (caveat: a fairly long w= hile back), I think it might be reasonable to move to a whole-buffer-and-re= pair strategy for emacs+treesit, and that might provide some nice simplific= ation along the way. Is there a good way to try this strategy now? I avoid = JS whenever possible, and that seems like it might be the current-best test= case...

Thanks,
~Chad
--000000000000ffdb0605df11cce9--