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.
This commit is contained in:
+6
-4
@@ -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"))
|
||||
|
||||
Reference in New Issue
Block a user