From: skykanin via "Bug reports for GNU Emacs, the Swiss army knife of text editors" <bug-gnu-emacs@gnu.org>
To: 61312@debbugs.gnu.org
Subject: bug#61312: Patch for eglot: scala LSP binary name
Date: Sun, 05 Feb 2023 21:15:48 +0000 [thread overview]
Message-ID: <-edmUJ29wZgHuAqckk1IXW8s3dBmAtrNRbO2nUbic7v2H38NPWS7HJIPpdeI1A-zvKlqRJ7LegKJ8HLszMHggEcWkVBu_z72mfmMBH3TwNg=@proton.me> (raw)
[-- 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
next reply other threads:[~2023-02-05 21:15 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-02-05 21:15 skykanin via Bug reports for GNU Emacs, the Swiss army knife of text editors [this message]
2023-02-06 15:46 ` bug#61312: Patch for eglot: scala LSP binary name Eli Zaretskii
2023-02-06 18:45 ` João Távora
2023-02-09 10:18 ` Eli Zaretskii
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='-edmUJ29wZgHuAqckk1IXW8s3dBmAtrNRbO2nUbic7v2H38NPWS7HJIPpdeI1A-zvKlqRJ7LegKJ8HLszMHggEcWkVBu_z72mfmMBH3TwNg=@proton.me' \
--to=bug-gnu-emacs@gnu.org \
--cc=61312@debbugs.gnu.org \
--cc=skykanin@proton.me \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).