Search code examples
emacslanguage-server-protocol

Why there is no language server protocol for the `emacs-lisp` language?


Why there is no language server protocol for the emacs-lisp language? For example, the lsp-mode package for Emacs contains support for many languages with their respecting language servers. But no emacs-lisp.

Why is that so?

The same goes for the eglot package too.


Solution

  • If there is no language server available for a given language, that is because no one has been sufficiently motivated to go to the effort of writing one.

    I'm sure if anyone wants this badly enough, they'll write one; but very few people who don't use Emacs are likely to be interested in writing a language server which is of almost no benefit to non-Emacs users; and for people who do use Emacs, Emacs has always provided a pretty robust development environment for writing Emacs Lisp, and I imagine most people feel that's already good enough.

    Also bear in mind that the development environment "Emacs" and the normal runtime environment for the programming language "Emacs Lisp" are the same program. Which is unusual. So Emacs isn't reliant upon any external program like a language server to tell it things about the language.

    I do recall this topic coming up in the development lists, and some people felt that the primary benefit to an elisp language server would be to people using editors other than Emacs and that efforts would be better directed at improvements to Emacs. There wasn't a general agreement on that, but nevertheless it probably reduces the pool of people who might feel the need to work on such a project in the first place.