bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#62407: 30.0.50; The command to run elixir-ls on Windows is `language


From: Eli Zaretskii
Subject: bug#62407: 30.0.50; The command to run elixir-ls on Windows is `language_server.bat`
Date: Fri, 24 Mar 2023 09:57:00 +0300

> From: 牟 桐 <mou.tong@outlook.com>
> CC: "62407@debbugs.gnu.org" <62407@debbugs.gnu.org>
> Date: Fri, 24 Mar 2023 02:22:44 +0000
> 
> 
> > What is the value of shell-file-name on that Windows
> > system?
> 
> It's `cmdproxy.exe` on Windows, after I changed it to `powershell.exe`
> and `cmd.exe`, the eglot's guess stays the same. I guess that is because
> eglot had hardcoded the result here:
> 
> https://github.com/emacs-mirror/emacs/blob/4566a0c6b825a18e6c065da0543b8b942b7db8df/lisp/progmodes/eglot.el#L224-L225
> 
> ``` emacs-lisp-mode
> ((elixir-mode elixir-ts-mode heex-ts-mode)
>  . ("language_server.sh"))
> ```

Can you see if the patch below solves your problem?

diff --git a/lisp/progmodes/eglot.el b/lisp/progmodes/eglot.el
index 058bcec..42793a1 100644
--- a/lisp/progmodes/eglot.el
+++ b/lisp/progmodes/eglot.el
@@ -222,7 +222,10 @@ eglot-server-programs
                                 (dart-mode . ("dart" "language-server"
                                               "--client-id" 
"emacs.eglot-dart"))
                                 ((elixir-mode elixir-ts-mode heex-ts-mode)
-                                 . ("language_server.sh"))
+                                 . ,(if (and (fboundp 'w32-shell-dos-semantics)
+                                             (w32-shell-dos-semantics))
+                                        "language_server.bat"
+                                      "language_server.sh"))
                                 (ada-mode . ("ada_language_server"))
                                 (scala-mode . ,(eglot-alternatives
                                                 '("metals" "metals-emacs")))





reply via email to

[Prev in Thread] Current Thread [Next in Thread]