Emacs Eglot / LSP Not Working

Share
Workaround available macOS, Linux, Windows Updated November 14, 2026Based on 4 user reportsHow we research

Quick answer

Eglot or lsp-mode fails to start a language server, most often because Emacs cannot find the server executable on its PATH. Fix PATH, then point eglot-server-programs at the server.

Most likely fix: Fix the PATH Emacs sees

How to fix it

Try these in order — the most common fix is first.

  1. 1. Fix the PATH Emacs sees

    1. Install exec-path-from-shell from MELPA
    2. Call (exec-path-from-shell-initialize) early in init
    3. Restart Emacs completely
    Did this fix it?
  2. 2. Check the server is installed

    1. Run the server in a terminal, for example pylsp or typescript-language-server --stdio
    2. Install it with your language's package manager
    Did this fix it?
  3. 3. Set the server command explicitly

    1. Customize eglot-server-programs
    2. Use the full absolute path to the server
    Did this fix it?
  4. 4. Read the events buffer

    1. Open the *EGLOT events* buffer
    2. Look for the actual error from the server
    Did this fix it?

Symptoms

M-x eglot says it cannot find or start a server, no completion or diagnostics appear, or it works in a terminal Emacs but not in the GUI app.

Why it happens

  • GUI Emacs on macOS does not inherit your shell PATH
  • The language server is not installed
  • No entry in eglot-server-programs for the major mode
  • PATH exports placed in the wrong shell startup file

This guide also covers

  • emacs eglot not working
  • emacs lsp-mode not starting
  • eglot server not found

Still not working?

If GNU Emacs keeps failing, you're not alone. See every GNU Emacs problem users report or the alternatives people switch to.

Have an app idea? Our small team builds any software: web and mobile apps, games, desktop, AI tools. Price agreed together.

Talk to us
Fixed it? Share this guide

Other GNU Emacs errors