[Top][All Lists]

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

Re: c-ts-mode

From: Eli Zaretskii
Subject: Re: c-ts-mode
Date: Fri, 08 Sep 2023 18:34:39 +0300

> From: João Távora <joaotavora@gmail.com>
> Date: Fri, 8 Sep 2023 16:15:09 +0100
> Cc: theo@thornhill.no, casouri@gmail.com, spacibba@aol.com, 
>       emacs-devel@gnu.org
> > > I guess this means we should add a TODO item for supporting such
> > > external specifications?
> >
> > Done; patches welcome.
> I couldn't find your TODO item (in etc/TODO at least).

Chrystal ball says you looked on master.  I made my change on the
emacs-29 branch instead.

> But I'm curious as to how you will phrase it: "supporting" can have
> many meanings.
> If it means "have some kind of interface for using" then Emacs already
> has one, which is `eglot-format`.  Although indirect (because LSP), it
> is a pretty effective in abstracting away different specs of different
> such tools (clang-format, prettier, eslint, etc).

I think we should try to support this without LSP servers.

> But if "supporting" means "plug into indent-line-function and
> indent-region-function", then it's going to be relatively hard, because
> as I explained, these are formatters, not indenters, so it's a bit
> of a round-peg, square-hole problem.

Which, as we all know, is a problem that was solved at least once.

> So if you want to keep the existing interface of those two functions
> (which would be ideal, since a lot of tooling already depends on
> them), there would have to be some way to communicate with these
> tools so that they only talk about indentation.  Not saying it's
> impossible, but it's hard, at least when LSP is used for abstracting
> away differences.

Let's talk after you read what I wrote in TODO.

reply via email to

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