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: Thu, 26 Sep 2024 15:49:41 +0200 Message-ID: Reply-To: Federico Beffa Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="------------7o1sMcpcyEmEarq1OkrRWFzn" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="30511"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Mozilla Thunderbird To: 73500@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Thu Sep 26 17:04:16 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 1stq2R-0007lq-Hu for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 26 Sep 2024 17:04:15 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1stq28-0004D3-JT; Thu, 26 Sep 2024 11:03:56 -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 1stq1n-00046J-H3 for bug-gnu-emacs@gnu.org; Thu, 26 Sep 2024 11:03:37 -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 1stq1m-0003cV-P1 for bug-gnu-emacs@gnu.org; Thu, 26 Sep 2024 11:03:35 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=debbugs.gnu.org; s=debbugs-gnu-org; h=From:MIME-Version:Date:To:Subject; bh=Fl6qxdNAPYqK4jGxvJD8XxZ6/kab2D4R/FItSz7G79M=; b=YjzIYiRToTiISM3NMv8EDjCzUZ4LYbD7+KejdZPUpavI2MlB2PFPTrWvBcsLqBMTSKMRtC3HS96N4Bzm44O5zsB9g0ZLhwdrf6xvdGq/TeV9t2kitIIwA8XpvkOsa4E0BJA0NW95RCKmQAxy1YpEAAOj8hHhDEh9wJq++a8ReB26ysgJhnRTVTx5dk9UhPWghphbaDeBbRHaTO5zlK3Is6XJLL+rDXw/Y/5dm6jATHBRJRyjKLeXAAzTu6/5qqTp2OEc3MADwEzczHSjlAl4tX6e7q/eaqo3K8WIqy3wVnNwr2M1rLYXLrQ/0q44lI/Ay+sZUeDfYSV0Zc4gFp2Dcw==; Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1stq2D-0006kG-W4 for bug-gnu-emacs@gnu.org; Thu, 26 Sep 2024 11:04: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: Thu, 26 Sep 2024 15:04:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 73500 X-GNU-PR-Package: emacs X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.172736299525821 (code B ref -1); Thu, 26 Sep 2024 15:04:01 +0000 Original-Received: (at submit) by debbugs.gnu.org; 26 Sep 2024 15:03:15 +0000 Original-Received: from localhost ([127.0.0.1]:39460 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1stq1R-0006iL-7s for submit@debbugs.gnu.org; Thu, 26 Sep 2024 11:03:15 -0400 Original-Received: from lists.gnu.org ([209.51.188.17]:51436) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1stosz-00010F-HS for submit@debbugs.gnu.org; Thu, 26 Sep 2024 09:50:26 -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 1stosX-00082V-K8 for bug-gnu-emacs@gnu.org; Thu, 26 Sep 2024 09:49:58 -0400 Original-Received: from smtp-190e.mail.infomaniak.ch ([185.125.25.14]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1stosS-0001Du-0L for bug-gnu-emacs@gnu.org; Thu, 26 Sep 2024 09:49:55 -0400 Original-Received: from smtp-3-0001.mail.infomaniak.ch (smtp-3-0001.mail.infomaniak.ch [10.4.36.108]) by smtp-3-3000.mail.infomaniak.ch (Postfix) with ESMTPS id 4XDw2G21Ddz41N for ; Thu, 26 Sep 2024 15:49:42 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=fbengineering.ch; s=20220212; t=1727358582; bh=Fl6qxdNAPYqK4jGxvJD8XxZ6/kab2D4R/FItSz7G79M=; h=Date:To:From:Subject:From; b=etxV7/ZBkErAH8mss5qOMXWXJ5gO31c9VoDy9/EJMjNMcHn5rbOwfYj9qsajds47V dvivBrR+Zofm4bBAkQ41XLsU4vBwHLngoJJZY56m17sL1yKlP/E4Rzlh8vbqqF0v+B svAcrEsNDuHJr6Ii3jGLtBq6SBuw2A4ARAbXAlFg= Original-Received: from unknown by smtp-3-0001.mail.infomaniak.ch (Postfix) with ESMTPA id 4XDw2F6Csbz5kV for ; Thu, 26 Sep 2024 15:49:41 +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 X-Infomaniak-Routing: alpha Received-SPF: pass client-ip=185.125.25.14; envelope-from=federico.beffa@fbengineering.ch; helo=smtp-190e.mail.infomaniak.ch 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, HTML_MESSAGE=0.001, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, RCVD_IN_VALIDITY_SAFE_BLOCKED=0.001, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Mailman-Approved-At: Thu, 26 Sep 2024 11:03:12 -0400 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:292469 Archived-At: This is a multi-part message in MIME format. --------------7o1sMcpcyEmEarq1OkrRWFzn Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit 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. --------------7o1sMcpcyEmEarq1OkrRWFzn Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: 8bit 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.

--------------7o1sMcpcyEmEarq1OkrRWFzn--