From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Vincenzo Pupillo Newsgroups: gmane.emacs.devel Subject: Re: treesit: how to get it to parse multiple languages Date: Tue, 19 Nov 2024 21:13:56 +0100 Message-ID: <2718624.vuYhMxLoTh@fedora> References: <87h68dvaca.fsf@mail.linkov.net> <7B1579B0-BD87-4DB8-86B6-7139558AF2EF@gmail.com> Mime-Version: 1.0 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="20743"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Peter Oliver , Andrew De Angelis , emacs-devel@gnu.org, Yuan Fu To: Juri Linkov , emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Tue Nov 19 21:14:22 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 1tDUc7-0005DS-Rp for ged-emacs-devel@m.gmane-mx.org; Tue, 19 Nov 2024 21:14:19 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tDUbr-0001nq-Qg; Tue, 19 Nov 2024 15:14:03 -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 1tDUbq-0001nL-3U for emacs-devel@gnu.org; Tue, 19 Nov 2024 15:14:02 -0500 Original-Received: from mail-ej1-x62c.google.com ([2a00:1450: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 1tDUbo-0006uf-Jf for emacs-devel@gnu.org; Tue, 19 Nov 2024 15:14:01 -0500 Original-Received: by mail-ej1-x62c.google.com with SMTP id a640c23a62f3a-a9ec86a67feso252116566b.1 for ; Tue, 19 Nov 2024 12:13:59 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1732047238; x=1732652038; darn=gnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=5m+cLxt9A3cuLdVIy1WwDs8ABg/cMTSJbwhiEFbaiBc=; b=jCU/btY0AbzWjJNPMyUnILvPscusRXDno6Ge/NqLu8k6EWIwlbVqpyJEDnhNgsrByT jtpVeJXNLZne37FvgIK0o4VxWO3wKLjNBhbSRHzCBi5F0i/IULFTn93xl9H/T7b0cBpm yddOhOinUO5dwlvgABtL3dladn4Ffbg2WVJhRBiLsfHbaP5cBL4BReHiphBO/dVYzbeI wryJzk78P6x/KpAL+2dWus0Wwsj9GsTOh0jYldW0C0KstQlYYxuav+mQDB538IxhF267 hpQjFms/uzgQHR0OJnd6w7KRr14AylS54Ua+z5qDNeRtplxO7ESnq77hyy1DswONyndT Yy1g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1732047238; x=1732652038; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=5m+cLxt9A3cuLdVIy1WwDs8ABg/cMTSJbwhiEFbaiBc=; b=rMJU/Z4YdhFdykHnVLzHN/x1bHxTM4WqYfUH+6P/W3ig4TLDgAOZobbyU6Pxboys0b eKh9Vv+4IF5SOyRiBJ0opsdXhgDupnKpqbbakvYjz5iEs78aK22zTm4hNogz7JydbofT m92gX4ywhfts+yYtHNC/eTdPdeVcQl7lCOOIauxMjAF2QkBjE7AEms2GGNUA2eDZQzNY F+hyFfTh7t1bKX9TuqZe+gKrRV7tW7Cl8y+imbkEI6LCp8j0SHMopILWnBhF395hx//0 x4yIYSNkSX97TGt5NG68ZbMe1oSxbsBxI+4h3EManAzTeU8QVqYcCK0bxcXXj/GGLJWj us5Q== X-Forwarded-Encrypted: i=1; AJvYcCX3jwiM8qt1VZ47JOZKpu602vb4+GV2WFvX2bHxLDW45xT1awgsGo5t5QBf/AfWBUAmBWCDn5mLYEP7ww==@gnu.org X-Gm-Message-State: AOJu0Yz34+EOXGXUGtLccNvB1kwFGoYxwhuBof4ekf/KyENXqPefEkCj 2tkJkAGbrTZPOcGyHfO5QEVjFhCcs7jcFzPr9Ecow1dSKKWTB12z X-Google-Smtp-Source: AGHT+IELJ78H3q4o0uJGUG90f8+DbP5sUwuAivLYi1idKoacWbqqnkhQ/4kYn0copKnbYfgXT+PEFQ== X-Received: by 2002:a17:907:9449:b0:a9e:d7e3:ccae with SMTP id a640c23a62f3a-aa4dd550eabmr17891266b.16.1732047238405; Tue, 19 Nov 2024 12:13:58 -0800 (PST) Original-Received: from fedora.localnet (2-230-139-124.ip202.fastwebnet.it. [2.230.139.124]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-aa20df7eee4sm681093966b.87.2024.11.19.12.13.57 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 19 Nov 2024 12:13:58 -0800 (PST) In-Reply-To: <7B1579B0-BD87-4DB8-86B6-7139558AF2EF@gmail.com> Received-SPF: pass client-ip=2a00:1450:4864:20::62c; envelope-from=v.pupillo@gmail.com; helo=mail-ej1-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:325516 Archived-At: In data marted=C3=AC 19 novembre 2024 08:01:28 Ora standard dell=E2=80=99Eu= ropa centrale,=20 Yuan Fu ha scritto: > > On Nov 11, 2024, at 11:28=E2=80=AFAM, Juri Linkov wro= te: > >>> a major mode out > >>> there that already implements multiple-language functionalities using > >>> treesitter. > >>>=20 > >>> =E2=80=A6 > >>>=20 > >>> Do you all know if such a mode exists? > >>=20 > >> In Emacs 30, php-ts-mode? > >>=20 > >> https://git.savannah.gnu.org/cgit/emacs.git/tree/lisp/progmodes/php-ts= =2Dmo > >> de.el>=20 > > It would be nice if html-ts-mode supported embedded css-ts-mode and > > js-ts-mode the same way. >=20 > Yeah, it can be a good poster child for writing multi-lang modes. My time= is > very limited now, so anybody sees this, feel free to give it a try. And > maybe document the code extensively too ;-) It's almost done (it's called mhtml-ts-mode), I hope to submit a patch with= in=20 the next week. Vincenzo