unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* Tree-sitter introduction documentation
@ 2022-12-16 14:47 Perry Smith
  2022-12-16 15:06 ` Eli Zaretskii
  0 siblings, 1 reply; 138+ messages in thread
From: Perry Smith @ 2022-12-16 14:47 UTC (permalink / raw)
  To: emacs-devel

[-- Attachment #1: Type: text/plain, Size: 581 bytes --]

There are (I believe) four pieces to get Tree Sitter major modes to work.

Emacs needs to be compiled with tree-sitter enabled
The tree sitter binary needs to be installed
The tree sitter language specific parser needs to be installed
The appropriate major mode needs to be loaded and enabled

Is there a page either in Info or on the web that contains all these steps?

If not, and others agree, how can I help create one?  I am thinking the entire page should be small and brief with references to more elaborate details on each of the four steps if needed.

Perry


[-- Attachment #2: Message signed with OpenPGP --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

^ permalink raw reply	[flat|nested] 138+ messages in thread
* Re: Tree-sitter introduction documentation
@ 2022-12-17  4:50 Payas Relekar
  0 siblings, 0 replies; 138+ messages in thread
From: Payas Relekar @ 2022-12-17  4:50 UTC (permalink / raw)
  To: Ken Brown; +Cc: Eli Zaretskii, Manuel Giraud, joaotavora, pedz, emacs-devel

Ken Brown <kbrown@cornell.edu> writes:

> On 12/16/2022 12:23 PM, Eli Zaretskii wrote:
>> I think it indeed will change very soon, as soon as the distros
>> realize that Emacs 29 needs that to be able to use the -ts- modes.
>
> I wonder how well known this is among distro Emacs maintainers.  I did a quick
> internet search and didn't find any indication that any distros have done it
> yet.  Can anyone point me to an example?

There is a very good chance NixOS will include tree-sitter grammars (at
least for the modes supported by Emacs at time of release) with Emacs
build, with user-configurable way to add more grammars as needed.

Current maintainers for building Emacs master for Nix/NixOS are doing a
good job keeping track of upstream here :
https://github.com/nix-community/emacs-overlay

Thanks,
Payas

--



^ permalink raw reply	[flat|nested] 138+ messages in thread
* Re: Re: Tree-sitter introduction documentation
@ 2022-12-18  6:32 Pedro Andres Aranda Gutierrez
  2022-12-18  8:07 ` Eli Zaretskii
  0 siblings, 1 reply; 138+ messages in thread
From: Pedro Andres Aranda Gutierrez @ 2022-12-18  6:32 UTC (permalink / raw)
  To: emacs-devel

[-- Attachment #1: Type: text/plain, Size: 1480 bytes --]

Ken writes:

> I wonder how well known this is among distro Emacs maintainers.  I did a
quick
> internet search and didn't find any indication that any distros have done
it
> yet.  Can anyone point me to an example?
>
> Ken

+1

I'm compiling emacs quite often in a container inside a VM, in order to
keep the number of libraries in my 'real' system under control. Using
containers, I'm able to generate .deb packages for different distros, which
is cool and I do mainly to test concepts I use in other contexts. So in a
sense, I'm packaging Emacs for myself.

Adding tree-sitter was straightforward for some bleeding-edge Debian based
distros, but not as easy for mainstream (e.g. Ubuntu focal, which is the
previous LTS). But that was only adding the library and compiling emacs
with the library.

I'm still struggling with the plug-ins... Questions I have are
1.- where will they sit at the end of the day?
2.- should I include *all* plug-ins or just the plug-ins I use (mainly
Python to get used to it)

The whole thing doesn't get better, because I'm also "playing" with Emacs
on macOS and there I'm still struggling with native compilation...

Anyhow, this is what makes things interesting and keeps my brain active.

/PA

-- 
Fragen sind nicht da um beantwortet zu werden,
Fragen sind da um gestellt zu werden
Georg Kreisler

Headaches with a Juju log:
unit-basic-16: 09:17:36 WARNING juju.worker.uniter.operation we should run
a leader-deposed hook here, but we can't yet

[-- Attachment #2: Type: text/html, Size: 2049 bytes --]

^ permalink raw reply	[flat|nested] 138+ messages in thread
* Re: Re: Tree-sitter introduction documentation
@ 2022-12-31  6:59 Pedro Andres Aranda Gutierrez
  2022-12-31  7:47 ` Eli Zaretskii
  0 siblings, 1 reply; 138+ messages in thread
From: Pedro Andres Aranda Gutierrez @ 2022-12-31  6:59 UTC (permalink / raw)
  To: emacs-devel

[-- Attachment #1: Type: text/plain, Size: 1485 bytes --]

Philip Kaludercic <philipk@posteo.net> writes:

> My main worry with these changes, along with the popularity of LSP is
> that while they are technological improvements, they all happen at the
> deterioration of Emacs' introspectability, increasing the effort it
> takes for the user to make changes.  IIUC you can't reload a .el file or
> just a singular expression if you want to change how completion via
> Eglot or how imenu works via Tree Sitter.  A simple hack becomes a
> weekend project.  This is not an unconditional good.

That's a very good point. My .02 cents of experience with eglot/treesit:

while I'm happy it works now on my multi-OS setup and I can seamlessly
switch computers, it took me a lot of time to understand and duck-duck-go
and set up. On top of that, there are some things I still don't completely
understand and can't explore on the *scratch* buffer and/or slime.

And yes, I've also tried tree-sitter for Python on my Linux and it makes me
wonder what the real gain is, because I'm using the plain python-mode on
the other systems and I can't feel a compelling argument to switch.

At least that was the case with eglot ;-) and this is why I've stayed with
it.

Happy new year (the 365 days of it)
/PA

-- 
Fragen sind nicht da um beantwortet zu werden,
Fragen sind da um gestellt zu werden
Georg Kreisler

Headaches with a Juju log:
unit-basic-16: 09:17:36 WARNING juju.worker.uniter.operation we should run
a leader-deposed hook here, but we can't yet

[-- Attachment #2: Type: text/html, Size: 2055 bytes --]

^ permalink raw reply	[flat|nested] 138+ messages in thread

end of thread, other threads:[~2023-01-03 12:14 UTC | newest]

Thread overview: 138+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-12-16 14:47 Tree-sitter introduction documentation Perry Smith
2022-12-16 15:06 ` Eli Zaretskii
2022-12-16 15:24   ` João Távora
2022-12-16 15:36     ` Perry Smith
2022-12-16 15:43       ` João Távora
2022-12-16 17:56       ` Philip Kaludercic
2022-12-16 15:38     ` Eli Zaretskii
2022-12-16 15:48       ` João Távora
2022-12-16 15:53         ` Perry Smith
2022-12-16 16:02           ` João Távora
2022-12-18  9:59             ` Eli Zaretskii
2022-12-18 14:07               ` Perry Smith
2022-12-18 17:18                 ` Eli Zaretskii
2022-12-16 16:34         ` Eli Zaretskii
2022-12-17  0:03           ` Tim Cross
2022-12-17  8:42             ` Eli Zaretskii
2022-12-17 10:40               ` João Távora
2022-12-17 11:00                 ` Eli Zaretskii
2022-12-18  0:40               ` Tim Cross
2022-12-16 16:01       ` Manuel Giraud
2022-12-16 16:40         ` Eli Zaretskii
2022-12-16 16:47           ` Perry Smith
2022-12-16 17:21             ` Eli Zaretskii
2022-12-16 15:53     ` Manuel Giraud
2022-12-16 15:56       ` João Távora
2022-12-16 16:39       ` Eli Zaretskii
2022-12-16 17:15         ` Manuel Giraud
2022-12-16 17:23           ` Eli Zaretskii
2022-12-16 20:22             ` Ken Brown
2022-12-17  4:06               ` Tim Cross
2022-12-17 15:42                 ` Stefan Monnier
2022-12-17 17:41                   ` T.V Raman
2022-12-26 22:42                   ` Dmitry Gutov
2022-12-27 12:11                     ` Eli Zaretskii
2022-12-27 12:43                       ` Dmitry Gutov
2022-12-27 13:38                         ` Eli Zaretskii
2022-12-27 14:11                           ` Dmitry Gutov
2022-12-27 14:32                             ` Eli Zaretskii
2022-12-27 16:36                               ` Stefan Monnier
2022-12-27 16:44                                 ` Philip Kaludercic
2022-12-27 17:16                                   ` Eli Zaretskii
2022-12-27 17:20                                     ` Philip Kaludercic
2022-12-27 18:06                                       ` Eli Zaretskii
2022-12-27 17:33                                     ` Stefan Monnier
2022-12-30 11:06                                   ` Yuan Fu
2022-12-30 11:25                                     ` Philip Kaludercic
2022-12-30 11:54                                       ` tomas
2022-12-30 11:59                                         ` Philip Kaludercic
2022-12-30 12:27                                           ` tomas
2022-12-30 12:45                                             ` Philip Kaludercic
2022-12-30 14:26                                             ` Dmitry Gutov
2022-12-30 23:33                                       ` Yuan Fu
2022-12-30 15:31                                     ` Eli Zaretskii
2022-12-30 15:54                                       ` Philip Kaludercic
2022-12-30 16:17                                         ` Eli Zaretskii
2022-12-31  0:06                                         ` Yuan Fu
2022-12-31  0:12                                           ` Philip Kaludercic
2023-01-01  1:18                                             ` Yuan Fu
2023-01-02 19:10                                               ` [SPAM UNSURE] " Stephen Leake
2022-12-31  0:03                                       ` Yuan Fu
2022-12-31  0:25                                         ` Stefan Monnier
2023-01-01  1:16                                           ` Yuan Fu
2023-01-01  6:39                                             ` Eli Zaretskii
2023-01-02  0:31                                               ` Yuan Fu
2023-01-02  0:40                                                 ` Stefan Monnier
2023-01-03  6:58                                                   ` Yuan Fu
2023-01-02  3:34                                                 ` Eli Zaretskii
2022-12-31  9:24                                         ` Eli Zaretskii
2022-12-31 22:14                                           ` Yuan Fu
2023-01-01  1:12                                             ` Yuan Fu
2022-12-31  0:44                                       ` Gregory Heytings
2023-01-03  4:08                                       ` Richard Stallman
2023-01-03 12:14                                         ` Eli Zaretskii
2023-01-01  3:03                                     ` Richard Stallman
2023-01-01  6:54                                       ` Eli Zaretskii
2023-01-01 19:14                                         ` Gregory Heytings
2023-01-01 20:11                                           ` Eli Zaretskii
2023-01-03  4:06                                         ` Richard Stallman
2023-01-03 12:06                                           ` Eli Zaretskii
2022-12-27 17:10                                 ` Eli Zaretskii
2022-12-27 17:31                                   ` Stefan Monnier
2022-12-27 18:08                                     ` Eli Zaretskii
2022-12-27 18:44                                       ` Stefan Monnier
2022-12-27 20:06                                         ` Philip Kaludercic
2022-12-27 21:13                                           ` Stefan Monnier
2022-12-28  2:52                                             ` Yuan Fu
2022-12-28 13:10                                               ` Gregory Heytings
2022-12-28 13:38                                               ` Lynn Winebarger
2022-12-28 14:41                                                 ` Danny Freeman
2022-12-29 11:14                                               ` Philip Kaludercic
2022-12-29 15:27                                                 ` Gregory Heytings
2022-12-29 15:40                                                   ` Lynn Winebarger
2022-12-29 21:50                                                     ` [SPAM UNSURE] " Stephen Leake
2022-12-29 22:37                                                       ` Lynn Winebarger
2022-12-30 14:10                                                       ` Lynn Winebarger
2022-12-30 16:25                                                         ` Targeting libtreesitter from wisent and other parser generators for emacs Lynn Winebarger
2022-12-31  8:25                                                           ` Eli Zaretskii
2022-12-31 13:07                                                             ` Lynn Winebarger
2022-12-29 15:45                                                   ` Tree-sitter introduction documentation Philip Kaludercic
2022-12-29 17:00                                                     ` Gregory Heytings
2022-12-29 17:12                                                       ` Philip Kaludercic
2022-12-29 17:31                                                         ` Gregory Heytings
2022-12-29 18:12                                                           ` Philip Kaludercic
2022-12-29 18:28                                                             ` Eli Zaretskii
2022-12-29 18:44                                                               ` Stefan Monnier
2022-12-29 19:34                                                                 ` Eli Zaretskii
2022-12-29 19:48                                                                   ` Stefan Monnier
2022-12-29 19:59                                                                     ` Eli Zaretskii
2022-12-29 18:32                                                             ` Stefan Monnier
2022-12-29 16:32                                                   ` Eli Zaretskii
2022-12-29 16:53                                                     ` Philip Kaludercic
2022-12-29 16:59                                                       ` Eli Zaretskii
2022-12-29 17:01                                                         ` Philip Kaludercic
2022-12-29 17:03                                                       ` Stefan Monnier
2022-12-29 17:12                                                         ` Gregory Heytings
2022-12-29 17:13                                                         ` Philip Kaludercic
2022-12-29 17:04                                                     ` Gregory Heytings
2022-12-30  1:01                                                 ` Gregory Heytings
2022-12-30 11:00                                                   ` Philip Kaludercic
2022-12-30 12:07                                                     ` Gregory Heytings
2022-12-30 13:10                                                       ` Philip Kaludercic
2022-12-30 15:23                                                         ` Gregory Heytings
2022-12-28 12:56                                         ` Gregory Heytings
2022-12-28 14:41                                           ` Stefan Monnier
2022-12-27 19:53                                       ` Dmitry Gutov
2023-01-01  3:03                                         ` Richard Stallman
2022-12-27 13:51                         ` tomas
2022-12-27 15:58                         ` Stefan Monnier
2022-12-16 17:23   ` Perry Smith
2022-12-16 17:31     ` Eli Zaretskii
2022-12-16 19:08       ` Perry Smith
2022-12-16 19:37         ` Eli Zaretskii
2022-12-16 20:05           ` Perry Smith
  -- strict thread matches above, loose matches on Subject: below --
2022-12-17  4:50 Payas Relekar
2022-12-18  6:32 Pedro Andres Aranda Gutierrez
2022-12-18  8:07 ` Eli Zaretskii
2022-12-18 10:39   ` Pedro Andres Aranda Gutierrez
2022-12-18 11:44     ` Eli Zaretskii
2022-12-31  6:59 Pedro Andres Aranda Gutierrez
2022-12-31  7:47 ` Eli Zaretskii

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).