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 23:01:28 -0800 Message-ID: <7B1579B0-BD87-4DB8-86B6-7139558AF2EF@gmail.com> References: <868qtzw6jh.fsf@gnu.org> <5F722FF0-EE05-4259-A222-C69526C8C37F@gmail.com> <87h68dvaca.fsf@mail.linkov.net> 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="20238"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Peter Oliver , Andrew De Angelis , emacs-devel@gnu.org To: Juri Linkov Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Tue Nov 19 08:02:06 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 1tDIFS-00059T-4l for ged-emacs-devel@m.gmane-mx.org; Tue, 19 Nov 2024 08:02:06 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tDIFC-00032E-ND; Tue, 19 Nov 2024 02:01:52 -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 1tDIF5-0002yJ-Qd for emacs-devel@gnu.org; Tue, 19 Nov 2024 02:01:44 -0500 Original-Received: from mail-pl1-x62e.google.com ([2607:f8b0:4864:20::62e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tDIF3-0005CK-Qn for emacs-devel@gnu.org; Tue, 19 Nov 2024 02:01:43 -0500 Original-Received: by mail-pl1-x62e.google.com with SMTP id d9443c01a7336-20c7ee8fe6bso4809435ad.2 for ; Mon, 18 Nov 2024 23:01:41 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1731999700; x=1732604500; 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=imwqwxekLOlAtWQiRyizbtKmwMF76wMlzpT7Ap99mV0=; b=CinYjK1ZnJdOz41xLE4XdEjqwQeWny8rqG4bHUGuNXYRAoTdErb9+rEZVNcDAVCHDE jsuz8w7vAcqqJlvwPoJbVPurA3B3Jbtz/ek7Lr+klwMaH88gcdQZxBLLbxd+yQszqRwf Ujaeo0roES+jCmaHz/3Zvk+/58X97SUN7//P21u49iEhfs359hXgYDJ5VNbh5xmTbw3y NkJsSNjwh2UqnX+VMJLfJgH+t+vaJ+1mwXSq/oEEtw1A5fZQGWcGsUMxR6PUQ2BMmjqz vraY/aI9/+tJqEmsizSa8TFzFI+Q6piG/ulxMlg5Is82sSuI+MIunx35IV5sQgB+BAv5 gQOQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1731999700; x=1732604500; 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=imwqwxekLOlAtWQiRyizbtKmwMF76wMlzpT7Ap99mV0=; b=g/fjF24ZI6Ics3H+jB4TeDp7pyOYMRyPdKjNFjMe13UNVXskuld+dGME+SI6M1EjVV pFH+iUP14Kg1/3kx1OQJAa0nCLfte48/SIhGM6kThEEpMqrdXz6FGUGV/QNokspPTkjC C1uzjnVoXafPrfM/wGMUuRsAUVz6ejKXI0I9vegTenxGUVN46/2O+GAftZKtW7HmodWm XQHYQielF8BLeXZlQaYP+hKEQnPUXel/dy6kMkUbM6JjaNJjJWKNfszOdhedu3rK8il3 38UbVmDggSnZpMCDMFCblLgJ4Ccp93rBewJBJw7pDt46xdNIAJWgSv9rACFT3jqv7XOW 55NA== X-Forwarded-Encrypted: i=1; AJvYcCWZAKPx+7x1hacv32lXFWOEwdsnGf+bhC/flchRho5czwKhumIbYm2xFx11h2s9ghqlvFtDqAseT0gTsw==@gnu.org X-Gm-Message-State: AOJu0YwKpK7OVdK9cTt6BrhjlQhEBcNzI5w3vmxUVRPU7d0uhdh4/YCs alIdxeCipPit85U4KhVuq+dVoqDhGfx1jp1mKmphwstEZLsOsgzz X-Google-Smtp-Source: AGHT+IFXAJ9ykV26g2ejbIgb5vN6K82fnhMLGJ7wQ8u2asY7FfGDC1ps/OjFUkV3gHW9y8Aj4KmHNw== X-Received: by 2002:a17:902:f78e:b0:212:f7d:9278 with SMTP id d9443c01a7336-2120f7d9ce9mr103036305ad.16.1731999700245; Mon, 18 Nov 2024 23:01:40 -0800 (PST) Original-Received: from smtpclient.apple ([2601:646:8f81:6120:6cf9:d5db:4cfd:3274]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-211ff3cdd34sm44810745ad.103.2024.11.18.23.01.39 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Mon, 18 Nov 2024 23:01:39 -0800 (PST) In-Reply-To: <87h68dvaca.fsf@mail.linkov.net> X-Mailer: Apple Mail (2.3776.700.51) Received-SPF: pass client-ip=2607:f8b0:4864:20::62e; envelope-from=casouri@gmail.com; helo=mail-pl1-x62e.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:325503 Archived-At: > On Nov 11, 2024, at 11:28=E2=80=AFAM, Juri Linkov = wrote: >=20 >>> 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-mod= e.el >=20 > It would be nice if html-ts-mode supported embedded css-ts-mode and = js-ts-mode > the same way. 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 ;-) Yuan=