unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#61312: Patch for eglot: scala LSP binary name
@ 2023-02-05 21:15 skykanin via Bug reports for GNU Emacs, the Swiss army knife of text editors
  2023-02-06 15:46 ` Eli Zaretskii
  0 siblings, 1 reply; 4+ messages in thread
From: skykanin via Bug reports for GNU Emacs, the Swiss army knife of text editors @ 2023-02-05 21:15 UTC (permalink / raw)
  To: 61312

[-- Attachment #1: Type: text/plain, Size: 447 bytes --]

Hello,

It seems that eglot expects the scala metals LSP server binary to be named `metals-emacs` instead of `metals`. The included patch fixes this behaviour. At least in the nix package manager the `metals` binary is simply call 'metals'. However if other package managers distribute an alias for the binary as 'metals-emacs' as well we could instead do something like:
```
(scala-mode . ,(eglot-alternatives '("metals" "metals-emacs"))
```

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-Patch-eglot-scala-LSP-server-binary-name.patch --]
[-- Type: text/x-patch; name=0001-Patch-eglot-scala-LSP-server-binary-name.patch, Size: 1225 bytes --]

From 215d54ff5ee3352bcda01d88d7a167925cd8dbeb Mon Sep 17 00:00:00 2001
From: skykanin <3789764+skykanin@users.noreply.github.com>
Date: Sun, 5 Feb 2023 21:41:19 +0100
Subject: [PATCH] Patch eglot scala LSP server binary name

Ensure that eglot picks up the correct
binary name for the scala metals LSP server.
---
 lisp/progmodes/eglot.el | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lisp/progmodes/eglot.el b/lisp/progmodes/eglot.el
index 4fa886bc78..ca025cf7d8 100644
--- a/lisp/progmodes/eglot.el
+++ b/lisp/progmodes/eglot.el
@@ -221,7 +221,7 @@ chosen (interactively or automatically)."
                                               "--client-id" "emacs.eglot-dart"))
                                 (elixir-mode . ("language_server.sh"))
                                 (ada-mode . ("ada_language_server"))
-                                (scala-mode . ("metals-emacs"))
+                                (scala-mode . ("metals"))
                                 (racket-mode . ("racket" "-l" "racket-langserver"))
                                 ((tex-mode context-mode texinfo-mode bibtex-mode)
                                  . ,(eglot-alternatives '("digestif" "texlab")))
-- 
2.39.0


^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2023-02-09 10:18 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-02-05 21:15 bug#61312: Patch for eglot: scala LSP binary name skykanin via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-02-06 15:46 ` Eli Zaretskii
2023-02-06 18:45   ` João Távora
2023-02-09 10:18     ` Eli Zaretskii

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).