[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: eglot--spinner

From: Danny Freeman
Subject: Re: eglot--spinner
Date: Fri, 18 Nov 2022 08:28:17 -0500

João Távora <joaotavora@gmail.com> writes:

> Hi Stephen,
> Look in the bug tracker: there's someone implementing a better
> progress indicator with an implementation that looks very good
> from what I've seen so far and uses LSP interfaces.
> Here it is: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=59149

I really need to prepare a response for your last question on that bug.
Sorry it's taking so long, lots going on with holidays coming up.

>> The only uses of eglot--spinner in eglot.el are:
>> eglot--mode-line-format, where it is added to the mode line.
>> eglot--signal-textDocument/didChange, where it is set to (list nil
>> :textDocument/didChange t), meaning didChange is done. Because this is
>> set to done, it is not actually displayed in the modeline.
>> For ada-mode, I'd like to use eglot--spinner to show "indexing"
>> progress; the server is parsing all the files in the project, collecting
>> cross reference information, which takes a while. The user needs to know
>> when it is done; then they can use cross reference commands.
>> So I'd like to delete setting eglot--spinner in
>> eglot--signal-textDocument/didChange; otherwise that will overwrite the
>> indexing progress when a buffer is edited.
>> This would also imply making eglot--spinner public.
>> That then raises the issue of future conflicting uses of eglot-spinner.
>> So perhaps it would be better for ada-mode to add another item to the
>> mode line? To do that requires a hook in eglot--mode-line-format, so it
>> is grouped with the other eglot-derived mode line items.

Have you looked in to if this ada-mode is using the $/progress
notifications from the lsp spec for this? That would work with my
spinner implementation. You can try out the patch from that bug and see.

It uses the minibuffer to report progress, showing either percentage or
a spinner if the server doesn't provide a percentage of work done. I
like that better than adding more stuff to the mode line personally.

Danny Freeman

reply via email to

[Prev in Thread] Current Thread [Next in Thread]