GNU bug report logs - #65418
29.1; Eglot: support clangd inactiveRegions extension

Previous Next

Package: emacs;

Reported by: Filippo Argiolas <filippo.argiolas <at> gmail.com>

Date: Mon, 21 Aug 2023 08:58:01 UTC

Severity: wishlist

Tags: patch

Found in version 29.1

Done: João Távora <joaotavora <at> gmail.com>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: help-debbugs <at> gnu.org (GNU bug Tracking System)
To: João Távora <joaotavora <at> gmail.com>
Cc: tracker <at> debbugs.gnu.org
Subject: bug#65418: closed (29.1; Eglot: support clangd inactiveRegions
 extension)
Date: Mon, 04 Sep 2023 20:36:02 +0000
[Message part 1 (text/plain, inline)]
Your message dated Mon, 4 Sep 2023 21:37:54 +0100
with message-id <CALDnm53R0+npU9-Pd34dXDs9F-pC2Z6JfBXtCszSymf4RPi9ow <at> mail.gmail.com>
and subject line Re: bug#65418: 29.1; Eglot: support clangd inactiveRegions extension
has caused the debbugs.gnu.org bug report #65418,
regarding 29.1; Eglot: support clangd inactiveRegions extension
to be marked as done.

(If you believe you have received this mail in error, please contact
help-debbugs <at> gnu.org.)


-- 
65418: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=65418
GNU Bug Tracking System
Contact help-debbugs <at> gnu.org with problems
[Message part 2 (message/rfc822, inline)]
From: Filippo Argiolas <filippo.argiolas <at> gmail.com>
To: bug-gnu-emacs <at> gnu.org
Subject: 29.1; Eglot: support clangd inactiveRegions extension
Date: Mon, 21 Aug 2023 10:41:46 +0200
Hi,
I've recently been working in some big C project with ton of ifdefs
and inactive code regions.

One of the few annoyances (maybe the last) remaining with emacs+eglot
is the inability to show these regions as grayed out in a LSP aware
way.

This was maybe possibile until now with clangd with semantic tokens
but they've recently introduced a new protocol extension that should
solve this problem in a much easier to implement way.

It's been introduced in clangd 17 with the review [1].

It should be pretty straightforward to implement as it's just a server
notification that sends inactive regions ranges once enabled.

In [2] you can find the pull request that added support for this in
vscode clangd extension.

I did some experiment on my own but I'm still not able to see the
notifications. Probably I'm missing something within eglot code base,
my impression was that enabling the inactiveRegions capability would
get me some Unknown notification message but I wasn't able to see
them.

Anyways it would be great if eglot could support this. Not sure
UI-wise what would be the best approach, vscode patch reduces the
opacity of the inactive regions but rendering them as comment would
also be nice at first.


1. https://reviews.llvm.org/D143974
2. https://github.com/clangd/vscode-clangd/pull/193/commits/ef75f637e7f79f94064369368ca665861836e482


[Message part 3 (message/rfc822, inline)]
From: João Távora <joaotavora <at> gmail.com>
To: Eli Zaretskii <eliz <at> gnu.org>, 65418-done <at> debbugs.gnu.org
Cc: felician.nemeth <at> gmail.com, philipk <at> posteo.net, filippo.argiolas <at> gmail.com
Subject: Re: bug#65418: 29.1; Eglot: support clangd inactiveRegions extension
Date: Mon, 4 Sep 2023 21:37:54 +0100
On Mon, Sep 4, 2023 at 5:18 PM Eli Zaretskii <eliz <at> gnu.org> wrote:

> The first of these 2 patches is trivial.  The second one is not
> trivial, but it looks like you've rewritten the text almost from
> scratch, so I indeed think we don't need any legal paperwork from
> Filippo for these changes, and you can install those on master.  (I
> would still encourage Filippo to start the paperwork rolling, so that
> we could accept his contributions in the future without limitations.)

Thanks very much for checking.  I just re-pushed the two commits.

And with this, closing the bug.


This bug report was last modified 1 year and 318 days ago.

Previous Next


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