LSP based on GCC

Eli Zaretskii eliz@gnu.org
Wed May 17 14:28:21 GMT 2023


Dear GCC developers,

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.

The Emacs LSP client comes with support for many popular LSP servers
OOTB and for all the programming languages supported by Emacs.
However, all the available servers for C and C++ languages are based
on Clang.  AFAIU, this is because GCC does not yet have its own
implementation of the LSP.  I found this message posted to gcc-patches
in 2017:

  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?

If there are no current plans for implementing LSP, I hope someone
will work on that soon, given that Emacs can now use it, and because
having a GCC-based LSP implementation will allow people to use their
installed GCC as the basis for LSP features, instead of having to
install yet another compiler.

TIA


More information about the Gcc mailing list