From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Federico Beffa via "Bug reports for GNU Emacs, the Swiss army knife of text editors" Newsgroups: gmane.emacs.bugs Subject: bug#73500: eglot: diagnostic location not always shown Date: Tue, 1 Oct 2024 22:18:15 +0200 Message-ID: <8f4a5079-4f29-450b-97b0-fde41dfa052d@fbengineering.ch> References: <1f4a7412-4bbf-4d08-ab41-e92d0398b541@gutov.dev> <1d06e46a-90c3-4683-9236-6550a57cd41d@fbengineering.ch> Reply-To: Federico Beffa Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="------------XLMobWhbDC9GjgMHyqs4TeNC" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="7700"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Mozilla Thunderbird To: Dmitry Gutov , 73500@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Tue Oct 01 22:19:34 2024 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 1svjLI-0001m8-MA for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 01 Oct 2024 22:19:33 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1svjKs-00033s-A9; Tue, 01 Oct 2024 16:19:06 -0400 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 1svjKo-000338-TL for bug-gnu-emacs@gnu.org; Tue, 01 Oct 2024 16:19:03 -0400 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1svjKo-0005rr-LS for bug-gnu-emacs@gnu.org; Tue, 01 Oct 2024 16:19:02 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=debbugs.gnu.org; s=debbugs-gnu-org; h=In-Reply-To:From:References:MIME-Version:Date:To:Subject; bh=G8RoGAKEFZOMl/7FvRR/yCIJ9cU8UF/uYW4U6u+V/oo=; b=pPout8/StckT6YENirVSqWP5UV8krh8Vdhp/6Zi0L9l6W8lQLyewKdliBULXejpsXEOF8l1Nv0FYOLMGkxhvPa5GC2I2NGW65y2UGmlSq7RTBv53AOQAbgK12W8KUIjDSjKs1mxMIjXkyEFOEZXyDYqW3U6AOe3whijp5TutlN0fE0KaBNUHl8D29itBOwglwocUKi5J6u5d/3bf3r+8MvDKhK+tzhxyn/vvoQxjJ/WZLjCf+BgBtgwn3jq3j9UScVhEU656z/WVk7zZEKwopx2jnXhcaR/8VOd+yBjaSc4YOk9qnBScKdzQVl6HPLIWdmEGs9YPSaOHJNN5/2UQIw==; Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1svjKo-0000A9-16 for bug-gnu-emacs@gnu.org; Tue, 01 Oct 2024 16:19:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Federico Beffa Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 01 Oct 2024 20:19:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 73500 X-GNU-PR-Package: emacs Original-Received: via spool by 73500-submit@debbugs.gnu.org id=B73500.1727813937614 (code B ref 73500); Tue, 01 Oct 2024 20:19:01 +0000 Original-Received: (at 73500) by debbugs.gnu.org; 1 Oct 2024 20:18:57 +0000 Original-Received: from localhost ([127.0.0.1]:53426 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1svjKi-00009p-Iu for submit@debbugs.gnu.org; Tue, 01 Oct 2024 16:18:57 -0400 Original-Received: from smtp-1909.mail.infomaniak.ch ([185.125.25.9]:33641) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1svjKe-00009b-LL for 73500@debbugs.gnu.org; Tue, 01 Oct 2024 16:18:55 -0400 Original-Received: from smtp-4-0001.mail.infomaniak.ch (unknown [IPv6:2001:1600:7:10:40ca:feff:fe05:1]) by smtp-4-3000.mail.infomaniak.ch (Postfix) with ESMTPS id 4XJ8QJ3XnNzgCV; Tue, 1 Oct 2024 22:18:16 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=fbengineering.ch; s=20220212; t=1727813896; bh=G8RoGAKEFZOMl/7FvRR/yCIJ9cU8UF/uYW4U6u+V/oo=; h=Date:Subject:To:References:From:In-Reply-To:From; b=ZfjMLoC/poC9AneDwhiDkLOuaYEanx2FGzm+OiAbt3+MwcQsRsKqyOQrAr7sIvKSl daIeegVwuw8rRxGMoJO/CFN3H4BisKSWm1bxOAkgKjnxIUjgHQX38mOzsrC46zaHdq BeTloys/ftHFzeSQFlyvPMRVWahulXsGeiPrW1R0= Original-Received: from unknown by smtp-4-0001.mail.infomaniak.ch (Postfix) with ESMTPA id 4XJ8QH6Ch4znFW; Tue, 1 Oct 2024 22:18:15 +0200 (CEST) Content-Language: en-US Autocrypt: addr=federico.beffa@fbengineering.ch; keydata= xsBNBFgAga0BCADIY78eSt/I4vGPo/UMBMQhcM8O2tptvlN0B2F6Z8sDAOwgWnQpd0x2AVM8 I39VymnmbEQfWf/Y0U9XJqrmOz91NreTsZUsR9BSZy1fVIUbdoQTI8m8CGpjDBnloX+cQwwD PDS2RL2/a0rZciXUMunVvM/o2zLHUIyO/GeoqKN5mU4d4nZYPHtBOBpmzfvfyZLM1uyu/flb KGFqW0uKmS8MQWhyUdvIsiAU/Aofuf0dVp2C/Z5w01Vyw38fReZ20onxbabSjLrOT+K6vzrV /9P+6435Ptoek+5BoQX50f+cMYq4d2rE2PBenDy4xAloL/qOUj6XqwW9ZWAkLLiqYiJdABEB AAHNMEZlZGVyaWNvIEJlZmZhIDxmZWRlcmljby5iZWZmYUBmYmVuZ2luZWVyaW5nLmNoPsLA kQQTAQgAOxYhBDd0gCSID9P/3KLJq1iTbg4vG1pMBQJjXqXsAhsDBQsJCAcCAiICBhUKCQgL AgQWAgMBAh4HAheAAAoJEFiTbg4vG1pMv1sH/1K4SI0+6tmpPLGwCUqpeUk5AScmqntZ41rT 9W8XF1QgZVsgSqFrVfQLpW+MC5VoMJJmdcPLD8gLLBhViavw8LrQzO8jO90US70MnUnniFB7 c0YabBsd2cGa25a+LOZ/f1lZCtHvlq46Trxcn9DM+pfexlM6AyN8+FGGIstSwXC96AOfr41U lSQqaLbD9ecf+VzPvOPozKLOpQaakuUFLeo9KB1VmK3UxWU3JQ96fJ+Aw8PXJLJFH8bSK/an OCzZPPFvICGUcqBKIDirUKzRyiC In-Reply-To: X-Infomaniak-Routing: alpha 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:292792 Archived-At: This is a multi-part message in MIME format. --------------XLMobWhbDC9GjgMHyqs4TeNC Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit On 01/10/2024 21:48, Dmitry Gutov wrote: > That one is using the face eglot-diagnostic-tag-unnecessary-face, > which you can customize to add an underline or any other decorations. > > It was added in commit 0f44d338f17bd4, see the description here > https://git.savannah.gnu.org/cgit/emacs.git/commit/?id=0f44d338f17bd4 > > The choice of using 'shadow' is explained with a reference to the > protocol, which says: > > /** >  * Unused or unnecessary code. >  * >  * Clients are allowed to render diagnostics with this tag faded out >  * instead of having an error squiggle. >  */ > > https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification/#diagnosticTag > > OK, I see, the shadow is so similar the normal font that, before you mentioned it, it was unnoticeable to me. But if it's customizable, that's great. > > Here a screenshot > > Same look on my machine. > > Should we remove the exclamation point instead, to avoid the semantic > conflict? I'm not sure, probably not. Is the exclamation mark used with all warnings? If yes, I'd keep it. Even if the warning has a tag equal to 1, it's still a warning. Thanks for your help! --------------XLMobWhbDC9GjgMHyqs4TeNC Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: 8bit
On 01/10/2024 21:48, Dmitry Gutov wrote:
That one is using the face eglot-diagnostic-tag-unnecessary-face, which you can customize to add an underline or any other decorations.

It was added in commit 0f44d338f17bd4, see the description here https://git.savannah.gnu.org/cgit/emacs.git/commit/?id=0f44d338f17bd4

The choice of using 'shadow' is explained with a reference to the protocol, which says:

/**
 * Unused or unnecessary code.
 *
 * Clients are allowed to render diagnostics with this tag faded out
 * instead of having an error squiggle.
 */

https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification/#diagnosticTag


OK, I see, the shadow is so similar the normal font that, before you mentioned it, it was unnoticeable to me. But if it's customizable, that's great.

> Here a screenshot

Same look on my machine.

Should we remove the exclamation point instead, to avoid the semantic conflict? I'm not sure, probably not.

Is the exclamation mark used with all warnings? If yes, I'd keep it. Even if the warning has a tag equal to 1, it's still a warning.

Thanks for your help!
--------------XLMobWhbDC9GjgMHyqs4TeNC--