emacs-devel
[Top][All Lists]
Advanced

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

Re: c-ts-mode


From: João Távora
Subject: Re: c-ts-mode
Date: Fri, 8 Sep 2023 21:27:51 +0100

On Fri, Sep 8, 2023 at 8:58 PM Petteri Hintsanen <petterih@iki.fi> wrote:

> It is great that Emacs is able to leverage the power of third party libs
> and tools, but I think this should not come at the expense of built in
> functionality.  Of course the rant above was a rhetoric exaggeration,
> but still it is perhaps something to keep in mind when designing for the
> future.

It was an interesting rant IMO :-)  I very much agree with some points,
such as this last one about keeping a clean Emacs functional (which
is also why I like having things in core).  I haven't made LSP-mandated
syntax highlighting a priority for Eglot precisely because Emacs does it
quite well already.

The point I definitely don't agree with is about the "editing experience".
Editing and comprehension of complex C++ code for example is hugely
augmented by LSP (not necessarily clangd).  These tools are here to
stay hopefully.  I can't go back to the days of cscope and grep
(as for CEDET, it never worked at all for me beyond toy tricks).

Other than that, I can see your point about clangd as a gateway
to external tools that Emacs already does very reasonably well, such
as formatting code.  But the reality is not everyone in the world
uses Emacs, and you have to work with them and their code.  Even
different Emacs users will have different C/C++ styles.

> [*] e.g. clangd eats regularly gigabytes of memory, has tons of
> dependencies, and needs tunings for the build and sysroot and whatnot

I built clangd from source the other day, didn't notice that
many dependencies (just LLVM which is pretty big I guess).  By the
way building from source is a sometimes a way to bypass "admin
rights" bothers.  I didn't install clang-format or clang-tidy
separately, they are already included.

As for huge size, you get what you pay for, IMO.  I think you can
tweak it down to just a code analyzer (but analyzing lots of code
code accurately takes a lot of resources yes -- look I didn't
invent templates ;-) ).

João



reply via email to

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