unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#57725: 29.0.50; eglot: Error when using :initializationOptions
@ 2022-09-11  7:02 Augusto Stoffel
  2022-09-11 15:13 ` Basil L. Contovounesios via Bug reports for GNU Emacs, the Swiss army knife of text editors
  0 siblings, 1 reply; 12+ messages in thread
From: Augusto Stoffel @ 2022-09-11  7:02 UTC (permalink / raw)
  To: 57725; +Cc: João Távora

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.





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

end of thread, other threads:[~2022-09-17 19:09 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-09-11  7:02 bug#57725: 29.0.50; eglot: Error when using :initializationOptions Augusto Stoffel
2022-09-11 15:13 ` Basil L. Contovounesios via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-09-11 16:20   ` João Távora
2022-09-11 16:25     ` Augusto Stoffel
2022-09-11 16:27       ` João Távora
2022-09-11 16:33         ` Augusto Stoffel
2022-09-11 16:38           ` João Távora
2022-09-17 11:17             ` Augusto Stoffel
2022-09-17 16:33               ` Stefan Kangas
2022-09-17 16:39                 ` Augusto Stoffel
2022-09-17 16:41                   ` Stefan Kangas
2022-09-17 19:09                     ` João Távora

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).