From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Filippo Argiolas Newsgroups: gmane.emacs.devel Subject: Re: [NonGNU ELPA] new package: clangd-inactive-regions Date: Tue, 5 Nov 2024 01:42:27 +0100 Message-ID: References: <87msifmcl5.fsf@posteo.net> Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="34565"; mail-complaints-to="usenet@ciao.gmane.io" Cc: rms@gnu.org, Stefan Kangas , emacs-devel@gnu.org, eliz@gnu.org To: Philip Kaludercic Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Tue Nov 05 01:43:31 2024 Return-path: Envelope-to: ged-emacs-devel@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 1t87fO-0008qs-Rs for ged-emacs-devel@m.gmane-mx.org; Tue, 05 Nov 2024 01:43:30 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1t87ef-0005aq-UA; Mon, 04 Nov 2024 19:42:45 -0500 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 1t87ee-0005aZ-7T for emacs-devel@gnu.org; Mon, 04 Nov 2024 19:42:44 -0500 Original-Received: from mail-pj1-x1031.google.com ([2607:f8b0:4864:20::1031]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1t87ec-0000DR-5s; Mon, 04 Nov 2024 19:42:43 -0500 Original-Received: by mail-pj1-x1031.google.com with SMTP id 98e67ed59e1d1-2e2e2d09decso4308604a91.1; Mon, 04 Nov 2024 16:42:40 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1730767359; x=1731372159; darn=gnu.org; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=wAUo3JeBn5SRT/L5mztJLZl7TT+phQdZhYrdloO7eEw=; b=QwTgmdygVFIFBDffATaLnNQDpsTcXv1aE3pjZiY+s/+eAuLbZlDH8R8xqwjgY4bc91 xf0L6LRQil3mvV3dFuohci1ILkowBpb4soY5NIuB0t/reae6ZbrvBecSEeZQf+G6/B3E DGEVvwhfWRVB/7lC8XFqbVjnVHyDn0ug93RTJAdZZDGebnuFv/OVBgFdeogp0BuSFkAy vLm0k9rRVS0OWSaD1/kM1q3tr6ftYM3UvVNHhgNEW+zdoi96dnf+4EGH1uEdfbie+uYX l588TAh0EaP5CwGTyQBTajwa1bsfhMwrTOPcvJWgiie9eohlkCBjpLOTgU2tXFPOEoNh HWGg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1730767359; x=1731372159; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=wAUo3JeBn5SRT/L5mztJLZl7TT+phQdZhYrdloO7eEw=; b=t5J3kSLjzjtWO3jR+FmaJDnKk+KRjeGyWCgTu4R+DIVDHppWrNT2Xyr0ekRQn0XBJY z7L+2qVGjYEVvC2XpG62Qw+hCvbtW4nIAfA+FyPg100tEBqj1itNITzv7BEl4d9/yKeR RrHrj7TKsIlCiSHwfydyoFWrqKau6C1Fk6r86poEz+70kbCdHSHzlCENYJvziHJMnYag 1r/WoKwuJj77sji+97WYilMwaa/f0zI0zO5IwzSaFYktMmySc57jnfFiDCTFQfvlHOUW UdRkRLHn/oketGNNOLv5O1NOcEU1apu7xZ+OzWleTfZqNwNp5FTV7xH16YOLgBPWTQK6 VlnA== X-Forwarded-Encrypted: i=1; AJvYcCVhyW38vfGbY5fP7gcI2MTMFLJVqapvLDJmdTKltxsNcWtX0sWUs2l2AMCovjj5Ny/s5U5s7mg0hikVFFU=@gnu.org, AJvYcCWO0frDpeuX9GvfGJVhDg6ZlufdmMB2+TNAfwdNOGJRsv5UWMNNwk5mCBt8HkOBLFtBcnMm@gnu.org X-Gm-Message-State: AOJu0Yw6Z6WqsTHl3QYT1RSuD6zkpYOJ41H64T4xSHFD2XOJuFmn8so5 k2xQ5EIhBawq5hBY+GyznNddprQiq3DkDBVO50fw1fti7ufbgMjeKjF4047CpausfbqUyYqdC09 2X8Z7SK6YTJ0G5D8hGjoPjLZvN6Y= X-Google-Smtp-Source: AGHT+IE0IjcXpzNig9q5Bi4Hf5YsXVgFwIN+wfbYQrF5PH6jw2vfs10cLgAMJb9EQEUwk1dAOrQ9qBgkUO2+WIxTMcQ= X-Received: by 2002:a17:90b:388d:b0:2c9:6abd:ca64 with SMTP id 98e67ed59e1d1-2e93e0abfb7mr25608326a91.9.1730767359143; Mon, 04 Nov 2024 16:42:39 -0800 (PST) In-Reply-To: <87msifmcl5.fsf@posteo.net> Received-SPF: pass client-ip=2607:f8b0:4864:20::1031; envelope-from=filippo.argiolas@gmail.com; helo=mail-pj1-x1031.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 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, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.devel:325124 Archived-At: On Mon, Nov 4, 2024 at 1:02=E2=80=AFPM Philip Kaludercic wrote: > > Filippo Argiolas writes: > > > On Mon, Nov 4, 2024 at 6:34=E2=80=AFAM Richard Stallman w= rote: > >> > > 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 cu= rrent > >> > > 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 cod= e? > >> 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). > Never really liked the name but there was no way to convey everything in a short name... eglot extension, specific to clangd, inactive regions etc. I never used ccls my self but I see from the PR linked by Felician that ccls support for their skipped ranges extension would be already easy enough to add. So a rename might actually make sense. Will think about it and report back! Filippo