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: help-debbugs <at> gnu.org (GNU bug Tracking System)
To: Stefan Kangas <stefankangas <at> gmail.com>
Cc: tracker <at> debbugs.gnu.org
Subject: bug#57725: closed (29.0.50; eglot: Error when using
 :initializationOptions)
Date: Sat, 17 Sep 2022 16:42:02 +0000
[Message part 1 (text/plain, inline)]
Your message dated Sat, 17 Sep 2022 18:41:17 +0200
with message-id <CADwFkmmVU+b=s138S-SZBZ_5H6LH378-RAPbO5eiHEic2KPv5A <at> mail.gmail.com>
and subject line Re: bug#57725: 29.0.50; eglot: Error when using :initializationOptions
has caused the debbugs.gnu.org bug report #57725,
regarding 29.0.50; eglot: Error when using :initializationOptions
to be marked as done.

(If you believe you have received this mail in error, please contact
help-debbugs <at> gnu.org.)


-- 
57725: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=57725
GNU Bug Tracking System
Contact help-debbugs <at> gnu.org with problems
[Message part 2 (message/rfc822, inline)]
From: Augusto Stoffel <arstoffel <at> gmail.com>
To: bug-gnu-emacs <at> gnu.org
Subject: 29.0.50; eglot: Error when using :initializationOptions
Date: Sun, 11 Sep 2022 09:02:49 +0200
If I attempt to pass :initializationOptions to a server like so:

    (setf (alist-get 'python-mode eglot-server-programs)
          '("jedi-language-server" :initializationOptions eglot--{}))

I get an error:

    Debugger entered--Lisp error: (invalid-slot-name "#<eglot-lsp-server eglot-lsp-server-92f0c8>" :initializationOptions)

A workaround is to add this to the eglot-lsp-server defclass:

@@ -788,6 +788,7 @@ treated as in `eglot-dbind'."
    (managed-buffers
     :documentation "List of buffers managed by server."
     :accessor eglot--managed-buffers)
+   (_ :initarg :initializationOptions)
    (saved-initargs
     :documentation "Saved initargs for reconnection purposes."
     :accessor eglot--saved-initargs)

I can also confirm that after the workaround, the options are passed
correctly to the server upon initialization.


[Message part 3 (message/rfc822, inline)]
From: Stefan Kangas <stefankangas <at> gmail.com>
To: Augusto Stoffel <arstoffel <at> gmail.com>
Cc: "Basil L. Contovounesios" <contovob <at> tcd.ie>, 57725-done <at> debbugs.gnu.org,
 João Távora <joaotavora <at> gmail.com>
Subject: Re: bug#57725: 29.0.50; eglot: Error when using :initializationOptions
Date: Sat, 17 Sep 2022 18:41:17 +0200
Augusto Stoffel <arstoffel <at> gmail.com> writes:

> Yes, please close this ticket here at the Emacs tracker.

Done.


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.