unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Filippo Argiolas <filippo.argiolas@gmail.com>
To: 65418@debbugs.gnu.org
Subject: bug#65418: 29.1; Eglot: support clangd inactiveRegions extension
Date: Mon, 21 Aug 2023 10:41:46 +0200	[thread overview]
Message-ID: <CAOdrLG+=jpW7e2mUPazKy31ntGHhjy0D6UpvmKWS9HkxuZrKwg@mail.gmail.com> (raw)

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





             reply	other threads:[~2023-08-21  8:41 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-08-21  8:41 Filippo Argiolas [this message]
2023-08-21 16:57 ` bug#65418: 29.1; Eglot: support clangd inactiveRegions extension Philip Kaludercic
2023-08-21 19:04 ` Felician Nemeth
2023-08-22  7:09   ` Filippo Argiolas
2023-08-22  8:56     ` João Távora
2023-08-22 11:02       ` Filippo Argiolas
2023-08-25 12:18         ` João Távora
2023-08-27 10:52           ` Filippo Argiolas
2023-08-27 14:01             ` João Távora
2023-08-31 17:28               ` Filippo Argiolas
2023-09-04  1:05                 ` João Távora
2023-09-04  1:08                   ` João Távora
2023-09-04  3:59                     ` Filippo Argiolas
2023-09-04  4:09                       ` Filippo Argiolas
2023-09-04 10:51                         ` João Távora
2023-09-04 12:44                           ` Eli Zaretskii
2023-09-04 12:49                             ` João Távora
2023-09-04 16:17                               ` Eli Zaretskii
2023-09-04 20:37                                 ` João Távora
2023-09-04 11:41                     ` Eli Zaretskii
2023-09-02  8:14               ` Filippo Argiolas

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAOdrLG+=jpW7e2mUPazKy31ntGHhjy0D6UpvmKWS9HkxuZrKwg@mail.gmail.com' \
    --to=filippo.argiolas@gmail.com \
    --cc=65418@debbugs.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).