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#73452: Code lens support in eglot Date: Tue, 24 Sep 2024 16:02:47 +0200 Message-ID: <05f4d679-d2cd-409c-aafd-bfac2eda7a21@fbengineering.ch> Reply-To: Federico Beffa Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="------------fedihT3DIuo5Gw0kObL8KlVZ" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="23551"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Mozilla Thunderbird Cc: joaotavora@gmail.com To: 73452@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Tue Sep 24 16:16:19 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 1st6Kw-0005sf-OS for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 24 Sep 2024 16:16:18 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1st6KZ-0001EX-DR; Tue, 24 Sep 2024 10:15: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 1st6KL-0001Ct-Rq for bug-gnu-emacs@gnu.org; Tue, 24 Sep 2024 10:15:54 -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 1st6KI-0000AP-H2 for bug-gnu-emacs@gnu.org; Tue, 24 Sep 2024 10:15:38 -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=YnxCpTTfYppCvdkHwsDiFeqcE444BjatAnAfsKK5B8k=; b=PDFsReM+tS8Q//0/Rrm85SjMmFhhi/lXdD9th8mR/nr9n8ojN6n5x8yT5dy1qfr0Mqj0YChG5NuhOQSKV1jH8puQ5Mkj/Ym7J/x9mrgSz9aZDtHfm1B/O9EN7Gwg8nNd5/ftqw6HcUElY3GtGlevuaAV8PTU9S40M/BzoWjChmwNdBh0BNusVSaKKJyIzBQLPkF6T+NxpJ7hYH+f1Z/HF+VAmwBl6qyyOyMtZOn1n2EFeHZdsExxqdTBhsRYLV0TtLboQQDirtWndvai7LWhGulDmHkBrUcDwx+FJBZlrBS+OMjXB+Vb7S8q2W7o3RRED9GXEgLta6WosYF6TqxwnA==; Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1st6Kg-0004CK-K1 for bug-gnu-emacs@gnu.org; Tue, 24 Sep 2024 10:16: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, 24 Sep 2024 14:16:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 73452 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.172718735416120 (code B ref -1); Tue, 24 Sep 2024 14:16:02 +0000 Original-Received: (at submit) by debbugs.gnu.org; 24 Sep 2024 14:15:54 +0000 Original-Received: from localhost ([127.0.0.1]:46549 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1st6KW-0004Bp-AO for submit@debbugs.gnu.org; Tue, 24 Sep 2024 10:15:54 -0400 Original-Received: from lists.gnu.org ([209.51.188.17]:53174) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1st68d-0003NE-Gg for submit@debbugs.gnu.org; Tue, 24 Sep 2024 10:03:36 -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 1st68A-0005yg-ND for bug-gnu-emacs@gnu.org; Tue, 24 Sep 2024 10:03:09 -0400 Original-Received: from smtp-8faf.mail.infomaniak.ch ([2001:1600:7:10::8faf]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1st687-0006Qd-7o for bug-gnu-emacs@gnu.org; Tue, 24 Sep 2024 10:03:05 -0400 Original-Received: from smtp-3-0001.mail.infomaniak.ch (smtp-3-0001.mail.infomaniak.ch [10.4.36.108]) by smtp-4-3000.mail.infomaniak.ch (Postfix) with ESMTPS id 4XChQJ4rKwzHQS; Tue, 24 Sep 2024 16:02:48 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=fbengineering.ch; s=20220212; t=1727186568; bh=YnxCpTTfYppCvdkHwsDiFeqcE444BjatAnAfsKK5B8k=; h=Date:To:Cc:From:Subject:From; b=AGlYcIuaWe6R7WsxKHmOT2UYqKNy39ON4qLs2Z+J7zkf9KDAi2B7q5pJlYKVMjImK VtrEuIPZKcWOc7IoEWLKavnvFRrOppfTgprnQ+d703UMUGVCq+Q+rI0IWGu9US1V9B F8BF7lpZc0GnnmMlz/MCkhxH+mRVVSiR+WGe8Lrw= Original-Received: from unknown by smtp-3-0001.mail.infomaniak.ch (Postfix) with ESMTPA id 4XChQH5bYgz5cw; Tue, 24 Sep 2024 16:02:47 +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=2001:1600:7:10::8faf; envelope-from=federico.beffa@fbengineering.ch; helo=smtp-8faf.mail.infomaniak.ch X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 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_DNSWL_LOW=-0.7, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Mailman-Approved-At: Tue, 24 Sep 2024 10:15:50 -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:292338 Archived-At: This is a multi-part message in MIME format. --------------fedihT3DIuo5Gw0kObL8KlVZ Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Hi, This is not a bug report, but rather an inquiry or feature request. I'm wondering if there are any plans for eglot to support code lens. These provide quite useful functionality. For example, the Haskell language server allows putting expressions (typically for test or documentation) in comments with a special syntax. The server then offers to execute the code (in VSCode appearing as a small button above the expression). When pressed, it inserts the result in a comment just below. Here's an example after execution: ```haskell addOne :: (Num a) => a -> a addOne x = x + 1 -- >>> addOne 2 -- 3 ``` Thanks for the great work! Fede --------------fedihT3DIuo5Gw0kObL8KlVZ Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: 7bit Hi,

This is not a bug report, but rather an inquiry or feature request. I'm wondering if there are any plans for eglot to support code lens.

These provide quite useful functionality. For example, the Haskell language server allows putting expressions (typically for test or documentation) in comments with a special syntax. The server then offers to execute the code (in VSCode appearing as a small button above the expression). When pressed, it inserts the result in a comment just below. Here's an example after execution:

```haskell
addOne :: (Num a) => a -> a
addOne x = x + 1

-- >>> addOne 2
-- 3
```

Thanks for the great work!
Fede
--------------fedihT3DIuo5Gw0kObL8KlVZ--