LSP based on GCC

Eli Zaretskii eliz@gnu.org
Wed May 17 17:10:18 GMT 2023


> From: David Malcolm <dmalcolm@redhat.com>
> Cc: "Frank Ch. Eigler" <fche@elastic.org>
> Date: Wed, 17 May 2023 11:46:58 -0400
> 
> > Emacs 29, to be released soon, will come with a built-in client for
> > the LSP protocol.  This allows to enhance important Emacs features,
> > such as at-point documentation, on-the-fly diagnostic annotations,
> > finding definitions and uses of program identifiers, enhanced
> > completion of symbols and code, etc., based on capabilities of LSP
> > servers.
> 
> Excellent.  Do you have a handy link to the specific LSP methods that
> Emacs consumes?

IIUC what you mean (I'm not an expert on LSP), then you will find the
answers here:

  https://git.savannah.gnu.org/cgit/emacs.git/tree/lisp/progmodes/eglot.el#n775
  https://git.savannah.gnu.org/cgit/emacs.git/tree/lisp/progmodes/eglot.el#n1721

> >   https://gcc.gnu.org/legacy-ml/gcc-patches/2017-07/msg01448.html
> > 
> > which described the initial implementation of LSP in GCC, but I seem
> > to be unable to find out what happened with that since then.
> > 
> > Are there plans for implementing the LSP in GCC?  If so, which GCC
> > version is expected to have this included?
> 
> I wrote that prototype, but I haven't touched it since 2017, and I
> already have more than enough other work, alas.  I'm happy to help if
> someone wants to pick up the work and finish it.

I hope someone will, thanks.

> BTW, in GCC 13 I implemented SARIF support for capturing diagnostics in
> a standardized JSON-based format [2]; see e.g. the "Diagnostic
> Serialization" slides in [3] which shows VS Code showing GCC
> diagnostics with squiggly underlines.  Has anyone implemented SARIF
> support for Emacs yet?

AFAIK, not yet.  I'll ask on the Emacs devel list if anyone is
interested.


More information about the Gcc mailing list