GNU bug report logs -
#62116
RFE: eglot: support window.showDocument LSP RPC
Previous Next
Full log
Message #88 received at 62116 <at> debbugs.gnu.org (full text, mbox):
On Sun, May 14, 2023 at 8:19 PM João Távora <joaotavora <at> gmail.com> wrote:
> > URI. So if it cannot open the file, because the user does not have the
> > required permissions, it is too late to send an error to the server.
>
> Oof, you're right. That's why I didn't want the async version. Hmm, so
> either we go back to the sync version (and solve the problems that that may
> bring -- which AFAICT are only speculations about imenu/which-func at this
> point) or we do some file-readable-p checking.
>
> Though the latter isn't horrible, ideally we would just proclaim that
> putting request-generating hooks into the major-mode hook isn't allowed.
> Because it's a bad idea anyway, since a mode hook is supposed to be cheap.
Scratch that. It's true that it's a bad idea in this particular case, but
my proposal is far from "ideal". The right thing to do is to extend jsonrpc.el
so that it allows asynchronous request dispatchers. Not only would this solve
the "needs to run in separate stack frame problem" but it would solve future
problems where Elisp JSONRPC endpoints need to contact other potentially
slow endpoints.
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.
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.