From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Danny Freeman Newsgroups: gmane.emacs.help Subject: Re: perl-ts-mode available? Date: Tue, 10 Oct 2023 21:59:39 -0400 Message-ID: <875y3d9ahp.fsf@dfreeman.email> References: <055ea3e2663d33081622632beaca87166a93f0e4.camel@adminart.net> <87zg0wxybg.fsf@dfreeman.email> <36ad3f96faef9e36a469895f9f34550b3498433e.camel@adminart.net> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="40142"; mail-complaints-to="usenet@ciao.gmane.io" Cc: help-gnu-emacs@gnu.org To: hw Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Wed Oct 11 04:09:41 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 1qqOfL-000AEv-FG for geh-help-gnu-emacs@m.gmane-mx.org; Wed, 11 Oct 2023 04:09:39 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qqOej-0007n7-33; Tue, 10 Oct 2023 22:09:01 -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 1qqOeg-0007mc-SF for help-gnu-emacs@gnu.org; Tue, 10 Oct 2023 22:08:58 -0400 Original-Received: from out-190.mta0.migadu.com ([2001:41d0:1004:224b::be]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qqOed-0005Kg-DJ for help-gnu-emacs@gnu.org; Tue, 10 Oct 2023 22:08:58 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=dfreeman.email; s=key1; t=1696990120; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=TsWxvDDy3vAZAYpOi7688DSfuGYP9B2z5kpAmpEkGZQ=; b=nX+sJwPVKHE7jgbWdL0BNI34OjwIvc2CgoGx/9gTgb44mDjnnHvnGuFEoEndw3kuSQA0dP P02LRZkU3Oq0/zuEnzkygVwmviQWgQNG/MCAk/CaJ/FoWiwqXHaHYJP5ax5PJ/25W4Jomq XO4L2I2qy208C3q52ToiJM42J8hiCaQ= X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. In-reply-to: <36ad3f96faef9e36a469895f9f34550b3498433e.camel@adminart.net> X-Migadu-Flow: FLOW_OUT Received-SPF: pass client-ip=2001:41d0:1004:224b::be; envelope-from=danny@dfreeman.email; helo=out-190.mta0.migadu.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, SPF_HELO_NONE=0.001, SPF_PASS=-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:145274 Archived-At: hw writes: >> 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. It's a good article to get your feet wet with tree-sitter. Take it or leave it, but there isn't much content out there to learn from other than reading tree-sitter modes that already exist, or reading the Emacs manual. The concepts for syntax highlighting and indentation with tree-sitter will carry over from html to perl easy enough once you get comfortable with writing tree-sitter queries. >> 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? That section in the manual explains how to use tree-sitter. It does do the parsing. The name of that part of the manual is very clear imo. -- Danny Freeman