all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Philip Kaludercic <philipk@posteo.net>
To: Filippo Argiolas <filippo.argiolas@gmail.com>
Cc: rms@gnu.org,  Stefan Kangas <stefankangas@gmail.com>,
	emacs-devel@gnu.org,  eliz@gnu.org
Subject: Re: [NonGNU ELPA] new package: clangd-inactive-regions
Date: Mon, 04 Nov 2024 12:02:14 +0000	[thread overview]
Message-ID: <87msifmcl5.fsf@posteo.net> (raw)
In-Reply-To: <CAOdrLG+3R2U=npGvFTt5FFS1wbCqYgThbHRqf7hS=RHzWR0WgQ@mail.gmail.com> (Filippo Argiolas's message of "Mon, 4 Nov 2024 08:17:13 +0100")

Filippo Argiolas <filippo.argiolas@gmail.com> writes:

> On Mon, Nov 4, 2024 at 6:34 AM Richard Stallman <rms@gnu.org> wrote:
>>   > > 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.
>>
>> Does "inactive region" mean unreachable code?  I am guessin so.
>>
>> Is there a standard way for lamguage servers to report unreachable code?
>> Could we make Emacs recognize that way?  Then eglot could handle it
>> for any language, and it would not be specific to clangd.
>
> In this context it means unreachable code as disabled by the
> preprocessor stage, e.g. code under a currently disabled ifdef branch.
> LSP advantage here is providing knowledge about how a file is compiled
> with proper build time flags and defines for current build
> configuration.
>
> At the moment it's a clangd specific extension, there was some plan[1]
> for standard LSP inclusion but I'm not sure it went anywhere.
> Also, does this specific meaning make sense for non c/c++/preprocessed
> languages?

It might not be a bad idea to anticipate future standardisations, or
other LSP servers supporting similar functionality, and branding the
package as eglot-inactive-regions instead of the more specific
clangd-inactive-regions (which also doesn't hint that it is eglot
specific).

> I believe unreachable in the control flow/static analysis sense can
> already be achieved with normal LSP diagnostics. If I am not mistaken
> clangd already provides diagnostics for this when clang-tidy is
> enabled.
>
>
> 1. https://github.com/clangd/clangd/issues/132#issuecomment-1722327517
>
>

-- 
	Philip Kaludercic on siskin



  reply	other threads:[~2024-11-04 12:02 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
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 [this message]
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=87msifmcl5.fsf@posteo.net \
    --to=philipk@posteo.net \
    --cc=eliz@gnu.org \
    --cc=emacs-devel@gnu.org \
    --cc=filippo.argiolas@gmail.com \
    --cc=rms@gnu.org \
    --cc=stefankangas@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.