From b425df90cfe4d4874f73061a20e076f2f565f67d Mon Sep 17 00:00:00 2001 From: Willem van den Ende Date: Tue, 3 Nov 2026 13:43:11 +0000 Subject: [PATCH] fix(elixir): let the OS files own eglot-server-programs The shared config.el hard-coded ("expert" "--stdio"), a mac-flavoured value from upstream c83209e, so it leaked into the Linux machine, where neither `expert' nor language_server.sh is installed and eglot was therefore configured with a program that cannot start. c2f24ba claimed the Linux fallback fixed this, but it only overrides *when it finds a server*: with nothing installed the broken shared value survived. The correction is to remove the shared setting entirely. config-mac.el already configures the mac's elixir-ls, and config-linux.el's cond now means "nothing found" leaves eglot at Emacs' default instead of pointing at a missing binary. config-linux.el's header comment said the shared file "used to point eglot at a macOS path"; reword it to state that the shared file does not configure the server at all, and why. --- config-linux.el | 10 ++++++---- config.el | 6 ------ 2 files changed, 6 insertions(+), 10 deletions(-) diff --git a/config-linux.el b/config-linux.el index 026b666..d612cde 100644 --- a/config-linux.el +++ b/config-linux.el @@ -9,10 +9,12 @@ ;; checkouts in unusual places) belong in config-local.el, which is ;; gitignored -- see config-local.example.el. -;; Elixir language server. The shared config.el used to point eglot at a -;; macOS path (/Users/willem/.elixir-ls/...), which was silently dead here. -;; Prefer `expert' if it is installed, else any elixir-ls on PATH, else -;; leave eglot alone rather than configuring a server that cannot start. +;; Elixir language server. The shared config.el deliberately does not +;; configure this: a single value cannot be right on both machines, and +;; pointing eglot at a binary that may not exist is worse than leaving it at +;; Emacs' default. So each OS file owns it. Here: prefer `expert' if it is +;; installed, else any elixir-ls on PATH, else leave eglot alone rather than +;; configuring a server that cannot start. (with-eval-after-load 'eglot (let ((server (cond ((executable-find "expert") '("expert" "--stdio")) diff --git a/config.el b/config.el index af75d50..3eb0a27 100644 --- a/config.el +++ b/config.el @@ -65,12 +65,6 @@ '((elixir-mode . elixir-ts-mode))) ) -(with-eval-after-load 'eglot - (setf (alist-get '(elixir-mode elixir-ts-mode heex-ts-mode) - eglot-server-programs - nil nil #'equal) - '("expert" "--stdio"))) - (use-package elixir-ts-mode :hook (elixir-ts-mode . eglot-ensure)