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: how to get it to parse multiple languages Date: Mon, 18 Nov 2024 22:59:20 -0800 Message-ID: References: <868qtzw6jh.fsf@gnu.org> <5F722FF0-EE05-4259-A222-C69526C8C37F@gmail.com> Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3776.700.51\)) 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="17490"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Eli Zaretskii , emacs-devel@gnu.org To: Andrew De Angelis Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Tue Nov 19 08:01:33 2024 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 1tDIEv-0004Qz-7Q for ged-emacs-devel@m.gmane-mx.org; Tue, 19 Nov 2024 08:01:33 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tDID3-0000E1-OO; Tue, 19 Nov 2024 01:59:37 -0500 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 1tDID1-0000Au-Qw for emacs-devel@gnu.org; Tue, 19 Nov 2024 01:59:35 -0500 Original-Received: from mail-pf1-x42a.google.com ([2607:f8b0:4864:20::42a]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tDID0-0004O4-3n; Tue, 19 Nov 2024 01:59:35 -0500 Original-Received: by mail-pf1-x42a.google.com with SMTP id d2e1a72fcca58-720c2db824eso577457b3a.0; Mon, 18 Nov 2024 22:59:33 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1731999572; x=1732604372; darn=gnu.org; 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=mEfKSU1jhFFreiiDnf42idcIlT+4VnsWDEZsPNb54mY=; b=U1lOzgBdr4kqzJmhmB9FwLCeuVr+rDUa8IFMEkHwesGJqhRZYF0uWtK2zlofvSQ8Ws zdjimqsu30uuWIFWnQBfBcthK/GR5OA6FPh4rsEeuY/dxbBA9LrEUCGNGHQ6/NRx5rk1 RF7YxAu7juk3sfl25VPmbZyWHOU3qZEyTTyT/68/KGo0AAlJF8b5Kmm2e0e6KPOPk7tk Ki5fB8igdZDDICTXVviD400LpvbP4ZDsUqph0RdQbh8DBsBX3bJp7fJnqVayfEZQ2wSD KityRki5PCvTTDp91CWgMOEi3WqAcx6EY2kb//WatFfrfaMCZV6GNQo6nz3awKtBjGZe 441w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1731999572; x=1732604372; 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=mEfKSU1jhFFreiiDnf42idcIlT+4VnsWDEZsPNb54mY=; b=XcaH6OckCFU6sXIMxaJlUmV/9Ma3CYq35434IHs/rqyHA3ZZxsjKGmqRboBhiTtsbe wD2QDcWyVtwb7JIor5HWz7QJSTl8AJwx+QCx6ocwdECiZtnVZZlfT0zcNEoHcb4OZdIz XqdF2dqywy5qdEXwvfCV/vsup2wUyv6yDpf1Z/iK71/mFiwcQzApsdeQ+J1g6H/J+Yl+ +PW/DrdbPKzldnicZal//fDOuguT0igWZn8CmhHiGmM7PUbwxyM5ohG/JpCaCk4nDpyN bHOL3X1wYH+UM1FSAu14xcJhETJunXQRQA+AhqGu0adotCZ7Kfk71xeRVOdZlDcOzg1k hSbA== X-Forwarded-Encrypted: i=1; AJvYcCXYWmB0LsgSQtAdrkx7PgcGCMyNhYNT6NPQhB2p+4QNiav+Ync6sZ23os29gSDFt+ZchQs2S5I0tWNeZA==@gnu.org X-Gm-Message-State: AOJu0YyqbrqkzOndzsYyBwLxl+0/Yh/5YCnP3QhCFwM5sb/KnIHZnVzo 3RQiHYcjVn/gc26kxTUVRBjfAgqbf7Ai/NjJkKE4/jyemMwed4YHvZzeVBHz X-Google-Smtp-Source: AGHT+IFZ7fz9qOfbK4JRYb9TqbhUwJ3RUDsfFIviJOkGHZNk+lGeO3Z2MW/JShk+epsn6teOP5k7jg== X-Received: by 2002:a05:6a00:b4b:b0:714:2069:d90e with SMTP id d2e1a72fcca58-72476f7dcbemr19867866b3a.26.1731999572176; Mon, 18 Nov 2024 22:59:32 -0800 (PST) Original-Received: from smtpclient.apple ([2601:646:8f81:6120:6cf9:d5db:4cfd:3274]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-7247711dd77sm7384365b3a.56.2024.11.18.22.59.31 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Mon, 18 Nov 2024 22:59:31 -0800 (PST) In-Reply-To: X-Mailer: Apple Mail (2.3776.700.51) Received-SPF: pass client-ip=2607:f8b0:4864:20::42a; envelope-from=casouri@gmail.com; helo=mail-pf1-x42a.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:325502 Archived-At: > On Nov 10, 2024, at 6:35=E2=80=AFAM, Andrew De Angelis = wrote: >=20 > Thanks so much! >=20 > I took a look at the Emacs 30 manual and it's a lot clearer, it's = perfect! > I think one thing that would truly be ideal is if there is a major = mode out there that already implements multiple-language functionalities = using treesitter. Seeing all the components in action would be quite = helpful: the simple HTML examples are very clarifying but they can only = do so much. >=20 > Do you all know if such a mode exists? `(ripgrep-regexp "local-parser" = source-directory)` on the master branch only shows me matches in = `treesit.el` itself (and associated ChangeLog / manual). > If it doesn't exist yet I'm happy to give it a knack when implementing = the notebook mode. I might have run into some more questions then :) As Peter has pointed out, php-ts-mode is a multi-language mode. And = elixir-ts-mode too. You can grep for =E2=80=9C:local=E2=80=9D, or = "treesit-range-rules=E2=80=9D. Yuan=