unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* eglot--spinner
@ 2022-11-18  8:27 Stephen Leake
  2022-11-18  8:48 ` eglot--spinner João Távora
  0 siblings, 1 reply; 6+ messages in thread
From: Stephen Leake @ 2022-11-18  8:27 UTC (permalink / raw)
  To: emacs-devel; +Cc: João Távora

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.

-- 
-- Stephe



^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: eglot--spinner
  2022-11-18  8:27 eglot--spinner Stephen Leake
@ 2022-11-18  8:48 ` João Távora
  2022-11-18 13:28   ` eglot--spinner Danny Freeman
  2022-11-19  9:36   ` eglot--spinner Stephen Leake
  0 siblings, 2 replies; 6+ messages in thread
From: João Távora @ 2022-11-18  8:48 UTC (permalink / raw)
  To: Stephen Leake, Danny Freeman; +Cc: emacs-devel

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

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

We can/should try to coalesce the "eglot--spinner" with that.

Thanks,
João


On Fri, Nov 18, 2022 at 8:27 AM Stephen Leake <
stephen_leake@stephe-leake.org> wrote:

> 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.
>
> --
> -- Stephe
>


-- 
João Távora

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

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: eglot--spinner
  2022-11-18  8:48 ` eglot--spinner João Távora
@ 2022-11-18 13:28   ` Danny Freeman
  2022-11-19  9:36   ` eglot--spinner Stephen Leake
  1 sibling, 0 replies; 6+ messages in thread
From: Danny Freeman @ 2022-11-18 13:28 UTC (permalink / raw)
  To: João Távora; +Cc: Stephen Leake, emacs-devel


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



^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: eglot--spinner
  2022-11-18  8:48 ` eglot--spinner João Távora
  2022-11-18 13:28   ` eglot--spinner Danny Freeman
@ 2022-11-19  9:36   ` Stephen Leake
  2022-11-19 11:24     ` eglot--spinner João Távora
  1 sibling, 1 reply; 6+ messages in thread
From: Stephen Leake @ 2022-11-19  9:36 UTC (permalink / raw)
  To: João Távora; +Cc: Danny Freeman, emacs-devel

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
>
> We can/should try to coalesce the "eglot--spinner" with that.

That is better than using the mode-line, and meets my needs.

So I suggest we just delete eglot--spinner.

-- 
-- Stephe



^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: eglot--spinner
  2022-11-19  9:36   ` eglot--spinner Stephen Leake
@ 2022-11-19 11:24     ` João Távora
  2022-11-20 21:46       ` eglot--spinner Stephen Leake
  0 siblings, 1 reply; 6+ messages in thread
From: João Távora @ 2022-11-19 11:24 UTC (permalink / raw)
  To: Stephen Leake; +Cc: Danny Freeman, emacs-devel

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

On Sat, Nov 19, 2022 at 9:36 AM Stephen Leake <
stephen_leake@stephe-leake.org> wrote:

> 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
> >
> > We can/should try to coalesce the "eglot--spinner" with that.
>
> That is better than using the mode-line, and meets my needs.
>
> So I suggest we just delete eglot--spinner.


I'd say you're right, I can't find a use for it atm.  Also delete the part
of the mode-line updating where it is consulted, as that is basically
dead code right now.

IIRC it was used when there was some RLS-specific code
that informed the user that RLS was not ready for some LSP
requests yet.

Perhaps we can still think of putting the progress indication resulting
from Danny's patch in the Eglot-specific mode-line section.

João

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

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: eglot--spinner
  2022-11-19 11:24     ` eglot--spinner João Távora
@ 2022-11-20 21:46       ` Stephen Leake
  0 siblings, 0 replies; 6+ messages in thread
From: Stephen Leake @ 2022-11-20 21:46 UTC (permalink / raw)
  To: João Távora; +Cc: Danny Freeman, emacs-devel

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

>> So I suggest we just delete eglot--spinner.
>
> I'd say you're right, I can't find a use for it atm.  Also delete the part
> of the mode-line updating where it is consulted, as that is basically
> dead code right now.

Done.

-- 
-- Stephe



^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2022-11-20 21:46 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-11-18  8:27 eglot--spinner Stephen Leake
2022-11-18  8:48 ` eglot--spinner João Távora
2022-11-18 13:28   ` eglot--spinner Danny Freeman
2022-11-19  9:36   ` eglot--spinner Stephen Leake
2022-11-19 11:24     ` eglot--spinner João Távora
2022-11-20 21:46       ` eglot--spinner Stephen Leake

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).