emacs-devel
[Top][All Lists]
Advanced

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

Re: cc-mode fontification feels random


From: Theodor Thornhill
Subject: Re: cc-mode fontification feels random
Date: Sat, 12 Jun 2021 17:56:34 +0200

Stefan Monnier <monnier@iro.umontreal.ca> writes:

>> @Stefan - I'm not sure I understand what you mean by troublesome for
>> elisp hackers.  These grammars have a lisp-like dsl, and is pretty
>> usable through C-M-x and defvars, see:
>> https://github.com/emacs-csharp/csharp-mode/blob/master/csharp-tree-sitter.el#L44.
>
> AFAIK the grammar itself is still written in Javascript.
>

Yeah, but compiled parsers can be supplied through CI or something like that.


[...]
>
> Agreed.  Maybe a first step would be to get copyright assignments and
> include the tree sitter module in GNU ELPA?
>

If I read some of these mails correctly it seems like that wouldn't be
possible due to interest from some of the parties involved in the main
package.  I don't know the details on that, though.  And Eli seems
unhappy with what's there.

As for making a little more concrete proposal for how to move forward,
would this be something like what we want?

- create/use c or rust bindings
- create an elisp-layer for interaction with the parse tree
- hook fontification and indentation into that elisp-layer

It feels like the elisp-layer will be the easiest part.  I'm not really
well versed in where to look in the c code of emacs for where and how to
link this, so some pointers would be nice.

It looks like most people agree that tree sitter support is wanted, so
maybe it's time to start doing it?  I can surely have a stab at it, but
I'd like some guidance for how to proceed best - if it's wanted, that
is.

--
Theodor



reply via email to

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