From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Stephen Leake Newsgroups: gmane.emacs.bugs Subject: bug#59149: Feature Request: Report progress of long requests in Eglot Date: Mon, 21 Nov 2022 10:04:08 -0800 Message-ID: <86fseckwvb.fsf@stephe-leake.org> References: <87educqkar.fsf@dfreeman.email> <86cz9jmg9r.fsf@stephe-leake.org> <87k03qvmla.fsf@dfreeman.email> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="19459"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Cc: 59149@debbugs.gnu.org To: Danny Freeman Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Mon Nov 21 19:05:14 2022 Return-path: Envelope-to: geb-bug-gnu-emacs@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 1oxBAP-0004pn-Hy for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 21 Nov 2022 19:05:14 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oxBAK-0000ck-2I; Mon, 21 Nov 2022 13:05:08 -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 1oxBAE-0000ZX-2x for bug-gnu-emacs@gnu.org; Mon, 21 Nov 2022 13:05:02 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oxBAD-0003TY-NZ for bug-gnu-emacs@gnu.org; Mon, 21 Nov 2022 13:05:01 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1oxBAD-0007e2-Ik for bug-gnu-emacs@gnu.org; Mon, 21 Nov 2022 13:05:01 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Stephen Leake Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 21 Nov 2022 18:05:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 59149 X-GNU-PR-Package: emacs X-Debbugs-Original-Cc: 59149@debbugs.gnu.org, bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.166905388329344 (code B ref -1); Mon, 21 Nov 2022 18:05:01 +0000 Original-Received: (at submit) by debbugs.gnu.org; 21 Nov 2022 18:04:43 +0000 Original-Received: from localhost ([127.0.0.1]:48769 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oxB9u-0007dE-RR for submit@debbugs.gnu.org; Mon, 21 Nov 2022 13:04:43 -0500 Original-Received: from lists.gnu.org ([209.51.188.17]:34466) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oxB9s-0007d4-Pn for submit@debbugs.gnu.org; Mon, 21 Nov 2022 13:04:41 -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 1oxB9j-0000Mp-2P for bug-gnu-emacs@gnu.org; Mon, 21 Nov 2022 13:04:36 -0500 Original-Received: from gproxy4-pub.mail.unifiedlayer.com ([69.89.23.142]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oxB9f-0003On-07 for bug-gnu-emacs@gnu.org; Mon, 21 Nov 2022 13:04:30 -0500 Original-Received: from cmgw15.mail.unifiedlayer.com (unknown [10.0.90.130]) by progateway6.mail.pro1.eigbox.com (Postfix) with ESMTP id D95C81004653F for ; Mon, 21 Nov 2022 18:04:10 +0000 (UTC) Original-Received: from host2007.hostmonster.com ([67.20.76.71]) by cmsmtp with ESMTP id xB9OoRxf3jBmMxB9OoGETy; Mon, 21 Nov 2022 18:04:10 +0000 X-Authority-Reason: nr=8 X-Authority-Analysis: v=2.4 cv=QMSt+iHL c=1 sm=1 tr=0 ts=637bbd9a a=dWLzHQi6WpdymmZIwiVdBw==:117 a=Fln8i1WyhtedwaIJAdHvmw==:17 a=dLZJa+xiwSxG16/P+YVxDGlgEgI=:19 a=9xFQ1JgjjksA:10:nop_rcvd_month_year a=vvvmwbhNdt4A:10:endurance_base64_authed_username_1 a=9i_RQKNPAAAA:8 a=Dy9dXtnXAAAA:8 a=LMXEDB98dIeFliOR3VoA:9 a=hqnlY9SSy_kA:10:uccc_2email_address a=Ev4oQ7kfJBNsvnoXShoW:22 a=7b_YKI4FLZevj963FIVU:22 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=stephe-leake.org; s=default; h=Content-Type:MIME-Version:Message-ID:Date: References:In-Reply-To:Subject:Cc:To:From:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=sUH7ZadpYh4kOnJaeF7bOpxROrYsjsBMc3e3HJZ1lUc=; b=I00cfnwfjE+hxioPTbyJVS5YOm 7+6MhhzY4+T/yAS6Bf8eZfSyvOm55DI974HH3L0JV1MM480Pp1k0eSkvalHKmv/FgZWArdzmtWYk6 PIHjjbu+3qusQEYpZUoc+xrQhUF4FWxRmnPr/EQ9cTOTfZAzWJGLQinHPIwTNIVpQXrlLQFptTlCP jqhF/eScAD94u1zyB+9Ms0Yvw7SgE1tG/avAh8r8B3fy+NxjU9dL3grTOdUfb/+lEZVjFJGwo4VX1 4MTKRpLve6Fl8ZfLdi69JQ032B/MoyfiLvq2xa8UzHN6E/Iku/RNSSJdSH3XKBgCCf46Bw2sOPfRU ZiesMUQg==; Original-Received: from 135-180-197-170.fiber.dynamic.sonic.net ([135.180.197.170]:49613 helo=DESKTOP-G20DCG1) by host2007.hostmonster.com with esmtpsa (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.95) (envelope-from ) id 1oxB9O-001KiO-6z; Mon, 21 Nov 2022 11:04:10 -0700 In-Reply-To: <87k03qvmla.fsf@dfreeman.email> (Danny Freeman's message of "Sat, 19 Nov 2022 13:03:24 -0500") X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - host2007.hostmonster.com X-AntiAbuse: Original Domain - gnu.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - stephe-leake.org X-BWhitelist: no X-Source-IP: 135.180.197.170 X-Source-L: No X-Exim-ID: 1oxB9O-001KiO-6z X-Source-Sender: 135-180-197-170.fiber.dynamic.sonic.net (DESKTOP-G20DCG1) [135.180.197.170]:49613 X-Source-Auth: stephen_leake@stephe-leake.org X-Email-Count: 3 X-Source-Cap: c3RlcGhlbGU7c3RlcGhlbGU7aG9zdDIwMDcuaG9zdG1vbnN0ZXIuY29t X-Local-Domain: yes Received-SPF: pass client-ip=69.89.23.142; envelope-from=stephen_leake@stephe-leake.org; helo=gproxy4-pub.mail.unifiedlayer.com X-Spam_score_int: 16 X-Spam_score: 1.6 X-Spam_bar: + X-Spam_report: (1.6 / 5.0 requ) BAYES_00=-1.9, DKIM_INVALID=0.1, DKIM_SIGNED=0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-0.001, RCVD_IN_SBL_CSS=3.335, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:248560 Archived-At: Danny Freeman writes: > Stephen Leake writes: > >> This works for my needs in ada-mode; + 1. > > Great to hear! > >> > Anyway, the way the user opts out of LSP configuration is via the user >> > variable eglot-ignored-server-capabilities. So there should be some >> > point where you check the associated LSP capability of "progress >> > reporting" with eglot--server-capable. > > I'm trying to work on using the eglot-ignored-server-capabilities > functionality with this, and am having some trouble. What exactly is the > capability to ignore here? The LSP says progress report is part of the base protocol, not optional: https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification/#progress > I believe this needs an entry somewhere in the > `eglot-client-capabilities` hierarchy. > > This: [2. application/emacs-lisp] ``` (cl-defgeneric eglot-client-capabilities (server) "What the Eglot LSP client supports for SERVER." (:method (s) (list :progress t ;; or maybe :$ (list :progress t) :workspace (list ... ... ))) ``` > > > > does not translate into anything when checking > `(eglot--capabilities (eglot-current-server))`. Other capabilities are > listed but not the new one I've added. Moving :progress into :workspace worked for me: :workspace (list :applyEdit t :executeCommand `(:dynamicRegistration :json-false) :workspaceEdit `(:documentChanges t) :didChangeWatchedFiles `(:dynamicRegistration ,(if (eglot--trampish-p s) :json-false t)) :symbol `(:dynamicRegistration :json-false) :configuration t :semanticTokens `(:refreshSupport :json-false) :workspaceFolders t :progress t) I have no idea why this works when yours does not. > nor does `(eglot--server-capable :progress)` ;; returns nil > `(eglot--server-capable :progressHandler)` ;; also nil > Note that this is checking the _server_ capabilities; since LSP does not define "projess" as a capability, no server will ever advertise that it is supported. So we can't use eglot-ignores-server-capabilities; we could maybe introduce eglot-ignored-client-capabilities. But we already have a mechanism for that; eglot-stay-out-of. So a user can do: (add-to-list 'eglot-stay-out-of 'progress) And in eglot-handle-notification ($/progress) we check for that: (unless (eglot--stay-out-of-p 'progress) ... There's probably a way to fold that check into the cl-defmethod dispatching parameters; I did not look into that. -- -- Stephe