From: Stefan Kangas <stefankangas@gmail.com>
To: Filippo Argiolas <filippo.argiolas@gmail.com>, emacs-devel@gnu.org
Cc: Eli Zaretskii <eliz@gnu.org>
Subject: Re: [NonGNU ELPA] new package: clangd-inactive-regions
Date: Sat, 2 Nov 2024 14:52:11 -0700 [thread overview]
Message-ID: <CADwFkm=Snf41MS4XMt7LuBC7jnoitks5eSuyKmEomFQG=yPTJw@mail.gmail.com> (raw)
In-Reply-To: <CAOdrLGKtYNg70aY-FVhDxs0YL2Lrk-ZW0MpPP=eakLxfj2sUFA@mail.gmail.com>
Filippo Argiolas <filippo.argiolas@gmail.com> writes:
> Just wanted to check if there's any interest in including my little
> package in NonGNU ELPA:
>
> https://github.com/fargiolas/clangd-inactive-regions.el
>
> It's an eglot extension that listens to clangd inactiveRegions
> notifications and shades inactive code accordingly. It's useful to
> highlight disabled code sections in a LSP aware way, honoring current
> building options and defines.
>
> It started as little more than an experiment but I've been using it on
> the day job with a ifdef-heavy codebase and it has been serving me
> well for more than a year. Thought it could be useful to other people
> too.
>
> I'm not exactly an elisp expert, so feedback is very welcome!
Thanks. It sounds useful, so I think we should add it. I'm interested
to see how well this will work in Emacs itself, but I didn't have time
to test it yet.
How would you feel about adding this package to GNU ELPA instead? The
main requirement would be copyright assignments to the FSF from all
current and future contributors. I see that you're the sole contributor
for now. I think that would be useful, since there seems to be a plan
to suggest adding this to the LSP protocol, in which case we'd really
want this in Eglot itself, I think.[1]
One comment from reading the README is that it would be helpful to add a
few sentences there about what the inactiveRegion LSP extension does.
For example, it could say something like this:
"inactiveRegions" is a clangd-specific extension to the LSP protocol
that allows LSP clients to hide code that is in a currently inactive
preprocessor branch.
...or something along those lines.
On a side note, I also read this in the README:
As far as I know Emacs doesn't have a way to set foreground text
opacity. Best would be a face attribute so that you can set it in an
overlay covering each inactive region and be done with
it. Unfortunately there is no attribute for this yet.
Would such a feature be hard to add to the display engine? Eli?
Footnotes:
[1] https://github.com/clangd/clangd/issues/132#issuecomment-1722327517
next prev parent reply other threads:[~2024-11-02 21:52 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-11-01 9:02 [NonGNU ELPA] new package: clangd-inactive-regions Filippo Argiolas
2024-11-02 9:13 ` Gerd Möllmann
2024-11-03 7:53 ` Filippo Argiolas
2024-11-03 8:43 ` Gerd Möllmann
2024-11-02 21:52 ` Stefan Kangas [this message]
2024-11-02 22:35 ` Felician Nemeth
2024-11-03 1:21 ` Stefan Kangas
2024-11-03 8:08 ` Filippo Argiolas
2024-11-03 15:07 ` Stefan Kangas
2024-11-04 17:36 ` Felician Nemeth
2024-11-03 5:59 ` Eli Zaretskii
2024-11-04 17:40 ` Felician Nemeth
2024-11-03 5:46 ` Eli Zaretskii
2024-11-04 5:34 ` Richard Stallman
2024-11-04 7:17 ` Filippo Argiolas
2024-11-04 12:02 ` Philip Kaludercic
2024-11-05 0:42 ` 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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='CADwFkm=Snf41MS4XMt7LuBC7jnoitks5eSuyKmEomFQG=yPTJw@mail.gmail.com' \
--to=stefankangas@gmail.com \
--cc=eliz@gnu.org \
--cc=emacs-devel@gnu.org \
--cc=filippo.argiolas@gmail.com \
/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 external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.