Subject: bug#59149: Feature Request: Report progress of long requests in Eglot

From: Stephen Leake <[email-masked]>
Date: Wed, 23 Nov 2022 10:01:28 -0800

Danny Freeman <[email-masked]> writes:

> Stephen Leake <[email-masked]> writes:
>
>> I just ran into the progress reporter in eglot--apply-text-edits; I'd
>> like to turn that off, but leave other progress-reporters on.
>> 
>> So we need something more fine-grained:
>> 
>> (setq eglot-progress-reporter-disable '(apply-text-edits))
>
> I believe that is a different progress reporter, unrelated to the one I
> would like to introduce. It is not a progress report that come from the
> lsp server, so I don't think it would be good to conflate them.

True, but how is the user to know where it comes from? We could provide
something like:

eglot-server-progress-reporter-disable
eglot-client-progress-reporter-disable

How does the user know which to set? They'll just set both, so there
might as well be only one.

> If the user wants to ignore specific progress indicators from the lsp
> servers then they could implement an empty version of
> eglot-handle-notification that matches their progress token.

I guess that's a reasonable starting point, but it doesn't work for
apply-text-edits.

> The result of this patch is a series of messages that display in the
> minibuffer:
>
> ```
> [eglot:website] clojure-lsp:  
> [eglot:website] clojure-lsp: 5% Finding kondo config

...

And the user can still use the minibuffer for find-file etc; the
messages are displayed to the right. Which can be confusing at first,
but works nicely.

-- 
-- Stephe