emacs-devel
[Top][All Lists]
Advanced

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

Re: Tree-sitter introduction documentation


From: Stefan Monnier
Subject: Re: Tree-sitter introduction documentation
Date: Tue, 27 Dec 2022 10:58:31 -0500
User-agent: Gnus/5.13 (Gnus v5.13)

> I think ELPA is a better place for this feature, though. Because we always
> want the user to get the latest version of the recipes.

A GNU ELPA package that helps install those grammars would make
sense, indeed.  At the same time there are some issues:
- This one package probably can't know about all the grammars needed by
  all the major modes out there.
- As you noted, the major mode is actually tied (typically via node
  names in the queries) to a particular grammar, so keeping that info
  separately from the major mode doesn't sound ideal.

I suspect we do need some `treesit-grammars` package that helps install
those grammars, and I think it makes a lot of sense for it to be a :core
package (or to be bundled in the Emacs tarball) so users don't need to
install that package before they get to install the grammars.

Maybe that package should also hold the locations of the grammars used
by the major modes that are in core.

But for major modes that aren't in core, it makes more sense to keep the
grammar location info with the major mode (and use the
`treesit-grammars` package to take care of fetching, compiling, and
storing the result at the appropriate place).


        Stefan




reply via email to

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