unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: "João Távora" <joaotavora@gmail.com>
To: Stefan Kangas <stefankangas@gmail.com>
Cc: "Basil L. Contovounesios" <contovob@tcd.ie>,
	57725-done@debbugs.gnu.org, Augusto Stoffel <arstoffel@gmail.com>
Subject: bug#57725: 29.0.50; eglot: Error when using :initializationOptions
Date: Sat, 17 Sep 2022 20:09:25 +0100	[thread overview]
Message-ID: <CALDnm52E81iLwJ0x9VXxPGH_1+dYxQQGGkXMA4fvOe7MB8khwA@mail.gmail.com> (raw)
In-Reply-To: <CADwFkmmVU+b=s138S-SZBZ_5H6LH378-RAPbO5eiHEic2KPv5A@mail.gmail.com>

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

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@gmail.com>
wrote:

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


-- 
João Távora

[-- Attachment #2: Type: text/html, Size: 1483 bytes --]

      reply	other threads:[~2022-09-17 19:09 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 [this message]

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=CALDnm52E81iLwJ0x9VXxPGH_1+dYxQQGGkXMA4fvOe7MB8khwA@mail.gmail.com \
    --to=joaotavora@gmail.com \
    --cc=57725-done@debbugs.gnu.org \
    --cc=arstoffel@gmail.com \
    --cc=contovob@tcd.ie \
    --cc=stefankangas@gmail.com \
    /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).