help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: perl-ts-mode available?


From: Danny Freeman
Subject: Re: perl-ts-mode available?
Date: Tue, 10 Oct 2023 21:59:39 -0400

hw <hw@adminart.net> 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



reply via email to

[Prev in Thread] Current Thread [Next in Thread]