[Top][All Lists]

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

Re: cc-mode fontification feels random

From: Ergus
Subject: Re: cc-mode fontification feels random
Date: Sat, 12 Jun 2021 20:39:44 +0200

On Sat, Jun 12, 2021 at 11:02:36AM -0700, Daniel Colascione wrote:

On June 12, 2021 10:25:19 AM Stefan Monnier <monnier@iro.umontreal.ca> wrote:

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.

Before we start a parallel effort, we definitely should make every effort
to get copyright assignments for the existing code.  Maybe we can't take
the package as-is because some contributors won't accept to sign the
paperwork, but we can probably get paperwork for a significant fraction
of the code.

That would already help reduce duplicated efforts.

This is very important, not just to reduce the amount of work, but also
to avoid alienating interested parties.

And Eli seems unhappy with what's there.

That doesn't mean we have to start over from scratch.

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

I think we'd want to link to the C API of tree-sitter.
There's no point going through Rust at this point, AFAICT.

- create an elisp-layer for interaction with the parse tree
- hook fontification and indentation into that elisp-layer

Sounds about right.


It's very important that the actual parsers be modules, at least optionally. It must be possible to customize and develop on a running Emacs, without a restart. To do that, if we stick with a model where generated parsers are in C, we must unload and reload compiled code. I am convinced we can make the module interface efficient enough for this to work without measurable overhead.

Yes of course. Once we have the internal infrastructure the parsers
should be modules that autocompile during the installation (like
If we make a simple infrastructure, those modules won't even require any
lisp code, just some instructions to download and compile the shared
object somewhere with a proper name?

reply via email to

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