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


Message #8 received at 73500 <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: Federico Beffa <federico.beffa <at> fbengineering.ch>,
 João Távora <joaotavora <at> gmail.com>
Cc: 73500 <at> debbugs.gnu.org
Subject: Re: bug#73500: eglot: diagnostic location not always shown
Date: Sat, 28 Sep 2024 14:16:02 +0300
> Date: Thu, 26 Sep 2024 15:49:41 +0200
> From:  Federico Beffa via "Bug reports for GNU Emacs,
>  the Swiss army knife of text editors" <bug-gnu-emacs <at> gnu.org>
> 
> I'm using `emacs` 29.4 with the `haskell-language-server` 2.8.0.0 on NixOS 24.05.
> 
> The following code
> ```haskell
> isAscending [x] = True
> ```
> produces the following diagnostic from the lsp
> ```elisp
> (:jsonrpc "2.0" :method "textDocument/publishDiagnostics" :params
>           (:diagnostics
>            [(:code "-Wunused-matches" :message "Defined but not used: ‘x’" :range
>                    (:end
>                     (:character 14 :line 17)
>                     :start
>                     (:character 13 :line 17))
>                    :severity 2 :source "typecheck" :tags
>                    [1])
>             (:code "-Wmissing-signatures" :message "Top-level binding with no type signature:\n  fbeCircle ::
> svg-builder-0.1.1:Graphics.Svg.Core.Element" :range
>                    (:end
>                     (:character 9 :line 25)
>                     :start
>                     (:character 0 :line 25))
>                    :severity 2 :source "typecheck")]
>            :uri "file:///home/user/tmp/haskell/test-flake-utils/test/src/Main.hs" :version 0))
> ```
> The first diagnostics (corresponding to the above code) is shown in the Emacs buffer only with an exclamation
> mark in the fringe. However, the diagnostic message is not shown anywhere unless the cursor is placed on
> the exact location in question (the 'x' in the square brakes). Without any visual aid, it's very difficult to pinpoint
> the exact location of the problem to see the message.
> 
> The other diagnostic in the same server message, on top of the exclamation mark, it's properly highlighted
> with a blue wiggled underline and easy to locate. I'd expect this to happen for all diagnostics.

João, any comments or suggestions?




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.