From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: hw Newsgroups: gmane.emacs.help Subject: Re: perl-ts-mode available? Date: Fri, 06 Oct 2023 22:44:24 +0200 Message-ID: <36ad3f96faef9e36a469895f9f34550b3498433e.camel@adminart.net> References: <055ea3e2663d33081622632beaca87166a93f0e4.camel@adminart.net> <87zg0wxybg.fsf@dfreeman.email> 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="2575"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Evolution 3.50.0 (3.50.0-1.fc39) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Fri Oct 06 22:45:19 2023 Return-path: Envelope-to: geh-help-gnu-emacs@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 1qorhH-0000Sh-6M for geh-help-gnu-emacs@m.gmane-mx.org; Fri, 06 Oct 2023 22:45:19 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qorgW-000324-FF; Fri, 06 Oct 2023 16:44:32 -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 1qorgU-00031X-SR for help-gnu-emacs@gnu.org; Fri, 06 Oct 2023 16:44:31 -0400 Original-Received: from mo4-p00-ob.smtp.rzone.de ([85.215.255.21]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qorgS-0002q2-PM for help-gnu-emacs@gnu.org; Fri, 06 Oct 2023 16:44:30 -0400 ARC-Seal: i=1; a=rsa-sha256; t=1696625064; cv=none; d=strato.com; s=strato-dkim-0002; b=ByMPWtvrCmLDCWNCSHStu8GJ0fxQSo7bKqw7uN0AbU+7OSl2LYYpp4k7RGgDjfdWWf 2BXqLZk91sY2K/J7AaXGp5p9DxQxQSm6jZNEudywBJQrWRX1CWfGn45pmOfE2TQH3V1I JTKmlV1eOJrqDCPyVTPqw5O/S3fPTBupiX1xyIeDdbFY5kuHm/Kighm+9Fnlcb/Rfx92 vgvKBsSplkl7KGgb1VSEcydEnkPgAC8kF0TL4gbrarpP4IFaIj6bW+m/R8OBiWPfgAGa yAtTATdrZ9ap5NAsZ5WWAT0ADALuPxEJR0e8VSBGe4mokefqJborL4zvhN/KLB9wmw6d S9bQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; t=1696625064; s=strato-dkim-0002; d=strato.com; h=References:In-Reply-To:Date:To:From:Subject:Message-ID:Cc:Date:From: Subject:Sender; bh=7pYBH3nInU/+VZ5cvoxVjtM/Yu2OxBxzQq9VI0odSbs=; b=TQi/4lTrqP7w7MuEf9SZgltcXlGnVs4Krsi/oneSLTNpTTD6vtBZa6lbdd4urdjHVd FGUdpsUJzte7PE5cnT2DMGdg/aac/CR1UkhEHOGQ/4+xmebf+YUUoceRg09OskSCgIaz Ocoley9x4Y2nxMbTBC/2fdqc0WyUgUKlIEr0DTDSZ2FMCmaU2HMwQ8JxA/5/KVYY6zGV TcKvb7mjHggvDPPKdQ2hgscv4v6KjIFsIUsi9tdG5JJXT2k/S8kv2a1ZYzLIqjGOo4xP y4NdV+3z/3MGLJNoUMPefT2WyTD2bXZh10zsPjsmaki3Qkyx9w3FCxR8QohXAyaBxPCv ISYA== ARC-Authentication-Results: i=1; strato.com; arc=none; dkim=none X-RZG-CLASS-ID: mo00 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; t=1696625064; s=strato-dkim-0002; d=adminart.net; h=References:In-Reply-To:Date:To:From:Subject:Message-ID:Cc:Date:From: Subject:Sender; bh=7pYBH3nInU/+VZ5cvoxVjtM/Yu2OxBxzQq9VI0odSbs=; b=ZfZP57qWM36OPUfcgfprcUVTsciHqSVXqgQi3+Wpg71F6TPf4AI6emREAVN7pw/Lfp 0PDoPyGCW9TVj52ZZSnRS1Yl/XX2fC8HWQkKi+cm5pcRD7nKZjhlxoxCCVCzujKXvSvI xKyWTNWoRCBV82C5EIkxN708ZJotpvdrl4jB9asPCnuPTnw0UeoS5Zvdf0pZqUqkQ5aX cQ+V9L/fSBS2gvygLzh3o1txY27Tu47ar2dxlSalkKQuptH1ITmVF+akUNrGiU6Ph4bo qFQ1/WecAwPlD1GTOHSGwfs7esgVsSz+VTrPuGtgYxNYwDgKm+55ULTwptZYzsZhJLpN bHNA== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; t=1696625064; s=strato-dkim-0003; d=adminart.net; h=References:In-Reply-To:Date:To:From:Subject:Message-ID:Cc:Date:From: Subject:Sender; bh=7pYBH3nInU/+VZ5cvoxVjtM/Yu2OxBxzQq9VI0odSbs=; b=0vGLnpHk5WHb9eAGVINpipGu/TODGA5SjNcgh7xg8QPmmqi25rwZ0hi6x4XfQIGbEv rdQ/xRfKB2wLBsYe5sCg== X-RZG-AUTH: ":O2kGeEG7b/pS1Ey9Rna9iAZFrfz26y6zbtmqiE/f0+UVPWzfkhbRoUzSCTTNnjIupuXQshKqSzq6usb8jFDREw18SkV79IBgPA==" Original-Received: from [IPv6:2a09:8e40:2e2:8800:1:ff:ff:f] by smtp.strato.de (RZmta 49.8.2 AUTH) with ESMTPSA id Y04bedz96KiODbi (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256 bits)) (Client did not present a certificate) for ; Fri, 6 Oct 2023 22:44:24 +0200 (CEST) In-Reply-To: <87zg0wxybg.fsf@dfreeman.email> Received-SPF: none client-ip=85.215.255.21; envelope-from=hw@adminart.net; helo=mo4-p00-ob.smtp.rzone.de 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, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H5=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_PASS=-0.001, SPF_NONE=0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.help:145223 Archived-At: On Thu, 2023-10-05 at 22:40 -0400, Danny Freeman wrote: > hw writes: >=20 > > Hi, > >=20 > > is a treesitter mode for perl available (somewhere)? Or is one about > > to be created? >=20 > I don't think so. >=20 > > I'd venture to write one, but looking at [1] tells me that I don't > > have a clue how to even begin such an endeavor. > >=20 > >=20 > > [1]: /usr/local/share/emacs/30.0.50/lisp/progmodes/c-ts-mode.el.gz >=20 > If you are interested in learning how, you could take a look at this > article, which walks you through creating a simple html-ts-mode: > https://www.masteringemacs.org/article/lets-write-a-treesitter-major-mode It's advertising some package the author's working on too much, and perl is probably way more complex than html. > Many of the things written there will carry over to writing a > perl-ts-mode. Maybe, maybe not. > The only other thing you need to get started with is a grammar: > https://github.com/tree-sitter-perl/tree-sitter-perl >=20 > There is also some info in the Emacs manual under the title > "(elisp)Parsing Program Source" I thought treesitter would do the parsing. And how do I know if I have a working treesitter module for perl when I don't even have a mode to use it with?