GNU bug report logs - #57725
29.0.50; eglot: Error when using :initializationOptions

Previous Next

Package: emacs;

Reported by: Augusto Stoffel <arstoffel <at> gmail.com>

Date: Sun, 11 Sep 2022 07:04:02 UTC

Severity: normal

Found in version 29.0.50

Done: Stefan Kangas <stefankangas <at> gmail.com>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: João Távora <joaotavora <at> gmail.com>
To: Stefan Kangas <stefankangas <at> gmail.com>
Cc: "Basil L. Contovounesios" <contovob <at> tcd.ie>, 57725-done <at> debbugs.gnu.org, Augusto Stoffel <arstoffel <at> gmail.com>
Subject: bug#57725: 29.0.50; eglot: Error when using :initializationOptions
Date: Sat, 17 Sep 2022 20:09:25 +0100
[Message part 1 (text/plain, inline)]
In the future, I would suggest the other direction.  Ask me or Stefan to
close the ticket at the Eglot tracker.

Anyway, I think this two-liner patch fixes the problem and doesn't have any
unintended side-effects for M-x eglot-reconnect.

diff --git a/eglot.el b/eglot.el
index ff94d5ca5f..3b1b1a9536 100644
--- a/eglot.el
+++ b/eglot.el
@@ -796,6 +796,8 @@ treated as in `eglot-dbind'."
   :documentation
   "Represents a server. Wraps a process for LSP communication.")

+(cl-defmethod initialize-instance :before ((_server eglot-lsp-server)
&optional args)
+  (cl-remf args :initializationOptions))

 ;;; Process management
 (defvar eglot--servers-by-project (make-hash-table :test #'equal)

On Sat, Sep 17, 2022 at 5:41 PM Stefan Kangas <stefankangas <at> gmail.com>
wrote:

> Augusto Stoffel <arstoffel <at> gmail.com> writes:
>
> > Yes, please close this ticket here at the Emacs tracker.
>
> Done.
>


-- 
João Távora
[Message part 2 (text/html, inline)]

This bug report was last modified 2 years and 304 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.