From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Danny Freeman Newsgroups: gmane.emacs.devel Subject: Re: eglot--spinner Date: Fri, 18 Nov 2022 08:28:17 -0500 Message-ID: <877czsxu7a.fsf@dfreeman.email> References: <86r0y07jlw.fsf@stephe-leake.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="1890"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Stephen Leake , emacs-devel To: =?utf-8?B?Sm/Do28gVMOhdm9yYQ==?= Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Fri Nov 18 14:35:22 2022 Return-path: Envelope-to: ged-emacs-devel@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1ow1Wb-0000JP-T3 for ged-emacs-devel@m.gmane-mx.org; Fri, 18 Nov 2022 14:35:22 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ow1Vk-000528-Gv; Fri, 18 Nov 2022 08:34:28 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ow1Vj-00051h-Af for emacs-devel@gnu.org; Fri, 18 Nov 2022 08:34:27 -0500 Original-Received: from out2.migadu.com ([188.165.223.204]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ow1Vg-0001bB-Hy for emacs-devel@gnu.org; Fri, 18 Nov 2022 08:34:27 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=dfreeman.email; s=key1; t=1668778460; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=zWzPsuJOmTAgQlCP8bjbq+zLuGLs2Ll67AlTCrnzKfo=; b=eQwIztOYVYyuq3+kN06dN0gMvtsWVRJvo/sFMNsVkLIj//fGLFR9CyvpYkv/jhqs4L3u5P sEH+0XqfEgMtJQ/+a/KRxboinHxv0XocsdvEf3A9fP+rE6Mtkf4/ruOkbWnEPHJkbJlSMt PkXhTCckhPHF9ndfFeA1gjKP5aiNdvI= X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. In-reply-to: X-Migadu-Flow: FLOW_OUT Received-SPF: pass client-ip=188.165.223.204; envelope-from=danny@dfreeman.email; helo=out2.migadu.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.devel:300104 Archived-At: Jo=C3=A3o T=C3=A1vora 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=3D59149 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. --=20 Danny Freeman