emacs-devel
[Top][All Lists]
Advanced

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

Re: Tree-sitter integration on feature/tree-sitter


From: Theodor Thornhill
Subject: Re: Tree-sitter integration on feature/tree-sitter
Date: Sun, 08 May 2022 00:02:00 +0200



On 7 May 2022 23:24, Stefan Monnier <monnier@iro.umontreal.ca> wrote:

BTW, a bit part of the font-lock and indentation rules is highly
dependent on the grammar being used and in addition to that, they're
likely mostly agnostic to the design of `indent-line-function` of
`font-lock.el`.

So it would make a lot of sense to try and work with other editors to
try and design an editor-agnostic way to provide that info, such that it
doesn't need to be re-done for each and every editor out there.

IOW I suggest looking at how Neovim/Atom/etc... specify that information
and see if/how we can reuse it.  And if their format is not convenient
for us, try to work with them to design a format that can be convenient
for everyone.


        Stefan

AFAICT most, if not all editors uses the same sexp based query language already, which means that you can copy paste the neovim config into the emacs equivalent, swap out some captures and you're done. I'm now sure how it can be even more general. 

One cool thing neovim does though is to use captures for indentation, not just highlights. 
Theo


reply via email to

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