GNU bug report logs - #62116
RFE: eglot: support window.showDocument LSP RPC

Previous Next

Package: emacs;

Reported by: Alan Donovan <adonovan <at> google.com>

Date: Sat, 11 Mar 2023 04:11:03 UTC

Severity: wishlist

Tags: patch

Full log


Message #94 received at 62116 <at> debbugs.gnu.org (full text, mbox):

From: Alan Donovan <adonovan <at> google.com>
To: João Távora <joaotavora <at> gmail.com>
Cc: sebastian.poeplau <at> mailbox.org, 62116 <at> debbugs.gnu.org,
 Felician Nemeth <felician.nemeth <at> gmail.com>, Dmitry Gutov <dgutov <at> yandex.ru>
Subject: Re: bug#62116: RFE: eglot: support window.showDocument LSP RPC
Date: Wed, 24 May 2023 18:13:25 -0400
Thanks for following through with this change. I just tried the
committed version and it works nicely for me.

On Tue, 16 May 2023 at 14:32, João Távora <joaotavora <at> gmail.com> wrote:
>
> [ Cc'ing Dmitry mostly because of the question in the last paragraph ]
>
> On Mon, May 15, 2023 at 11:45 AM João Távora <joaotavora <at> gmail.com> wrote:
>
> > I'm working on this change to jsonrpc.el.  This will solve the Eglot
> > showDocument
> > problem by allowing the find-file _and_ the return code calculation to be async.
>
> Continuing this soliloquy :-) I'm putting this more ambitious change
> on the back burner.  It's not immediately clear how to implement this
> cleanly.  The best I can think of is to change jsonrpc.el to allow the
> request handler to return a function  that is then passed a "success"
> and an "error" callbacks.  But not only is this not spectacularly clean,
> it  doesn't really solve the "nested" request problem by itself.
> Furthermore there aren't any other clients for these kinds of requests
> yet, and there seems to be ongoing work for a future/promises system
> which could make this cleaner.
>
> So for window/showDocument specifically, I went with the much simpler
> check of file-readable-p before reporting success (or failure).
>
> I also addressed Alan's report of a problem with the widening.  I
> used xref--goto-pos, which I normally wouldn't do, but that
> internal function semantics is exactly what was needed here.
> Maybe Dmitry can agree to export it?
>
> João




This bug report was last modified 1 year and 291 days ago.

Previous Next


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