GNU bug report logs - #73500
eglot: diagnostic location not always shown

Previous Next

Package: emacs;

Reported by: Federico Beffa <federico.beffa <at> fbengineering.ch>

Date: Thu, 26 Sep 2024 15:04:01 UTC

Severity: normal

Done: Dmitry Gutov <dmitry <at> gutov.dev>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Dmitry Gutov <dmitry <at> gutov.dev>
To: Federico Beffa <federico.beffa <at> fbengineering.ch>, 73500 <at> debbugs.gnu.org
Subject: bug#73500: eglot: diagnostic location not always shown
Date: Tue, 1 Oct 2024 22:48:19 +0300
On 01/10/2024 19:32, Federico Beffa wrote:

>> I cannot comment on the whole previous discussion, but what I'm seeing 
>> here's is both diagnostics are rendered, but one of them (the first 
>> one) gets lost inside the second one visually.
>>
>> Is that the problem?
>>
> 
> No, not really. The initial report included a single line code example 
> that I extracted from a slightly longer example and produces 3 
> diagnostics, one more than the full code that I was using. In the 
> following emails I sent the following full example:

Great! I guess it exhibits something I haven't noticed.

> ```haskell
> module Main where
> 
> isAscending :: [Int] -> Bool
> isAscending [] = True
> isAscending [x] = True
> --           ^ thix 'x' is not underlined!
> isAscending (x : y : ys) = x < y && isAscending (y : ys)
> 
> main :: IO ()
> main = putStrLn "Hello, bug 73500!"
> ```
> 
> Here I see the fringe exclamation mark on the line above the comment, 
> but no underline anywhere. What I'd expect is to see the `x` underlined 
> (comment likely off due to non-monospaced fonts in the email).

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

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




This bug report was last modified 285 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.