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: Sun, 3 Nov 2024 08:53:38 +0100 Message-ID: References: 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="25273"; mail-complaints-to="usenet@ciao.gmane.io" Cc: emacs-devel@gnu.org To: =?UTF-8?Q?Gerd_M=C3=B6llmann?= Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Sun Nov 03 08:54:49 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 1t7VRf-0006Vp-RU for ged-emacs-devel@m.gmane-mx.org; Sun, 03 Nov 2024 08:54:47 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1t7VQp-0004a1-Ch; Sun, 03 Nov 2024 02:53:55 -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 1t7VQn-0004Zb-Qx for emacs-devel@gnu.org; Sun, 03 Nov 2024 02:53:53 -0500 Original-Received: from mail-pg1-x534.google.com ([2607:f8b0:4864:20::534]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1t7VQm-0007SN-9H for emacs-devel@gnu.org; Sun, 03 Nov 2024 02:53:53 -0500 Original-Received: by mail-pg1-x534.google.com with SMTP id 41be03b00d2f7-7ea12e0dc7aso2191634a12.3 for ; Sun, 03 Nov 2024 00:53:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1730620430; x=1731225230; 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=eE/nbPmZSsn4hOiIQ5eoO6UtS1wqzyqyD0Idu12Pp4k=; b=WsT6deyoYdNs4NhoujKCR/c6X6j5ttyKtrRYE7CpzuIkFS1h+H/UafT3TDpi0t5+vW wNiHr96oPtlrVE6K5xw8MNqjtRrpQGlYg9R04NIDJuCC1rkQevNhY81yWotgjfo4s/bx W3IF0gp3HgZ+fWXBctNbgsWDgSijqoWbLWDPgBCdStfNocxFY92ox0W1jEZYEfyFS1f+ k+L2LTl8+5PB77L/nxNbARVdlYSfKYM6OrV9fw8Mbfs3J0kEKeVws5PEuFx2cOkU/Q0P dCh5x1q2jXfu95jibrLD5BA6ZXJCGwQTt+4kwOs0/5C+VJv/1X1iRk9eE7q482/MPLhb M7Cg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1730620430; x=1731225230; 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=eE/nbPmZSsn4hOiIQ5eoO6UtS1wqzyqyD0Idu12Pp4k=; b=VGz7OE67ucmBPfYBnfh3TWcfsYAGp98rs71wNoxWLeW7dZk5ATv0OClWoABqqn02Ts LxwR7u/aCGaGesVZbW9AVoD9dXnGMCB/G8AkIf0ohpNtiNXklheINqoPF+LxA8mwePZO Hk8VX5i2c7+CUPgZ70pnAQSEQDPbxADwFE0qjm3ykAGj8q7t2msGjOfyehLBRXwxVrJA tzyuPdfOOPeai2jDTGCD3x2zwkuT3epfr/D30GqoK7mfK5eXTa4jvy6p3hQuQOCeqzkb pzYdFmLvhmFUAZqogUfmx5mppLGeSkRPo+vN/QwTDLj6wUkCm3i/w2UZehrTwE3Hu4Zz 9/Fw== X-Gm-Message-State: AOJu0Yz8Pc4Mzx+ZDnIkYXv+W8TxrUG0g2g8dEutyLXmoczrrgRcwPpj JTz8U7jGt64a7h49rd/tndZ/EyrpEPaeLxvV8zMMPDdfoLJKv6ogz43T2kg6MEr/eakfNHkSFr5 KD0wEj3UyLssLvJxhh6qbr6NVe/vOVw== X-Google-Smtp-Source: AGHT+IEkAZRzvpjCQL9ZTeRP6rTHIQ43G1zE0JUk//5snl9lJYvCxRwWtYTTMVk0NaOHKBfQ1+aq27EQ/h47sW7gEhw= X-Received: by 2002:a17:90b:4fd1:b0:2e2:ba35:356e with SMTP id 98e67ed59e1d1-2e94c2dca3dmr11765144a91.17.1730620430443; Sun, 03 Nov 2024 00:53:50 -0700 (PDT) In-Reply-To: Received-SPF: pass client-ip=2607:f8b0:4864:20::534; envelope-from=filippo.argiolas@gmail.com; helo=mail-pg1-x534.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:325049 Archived-At: On Sat, Nov 2, 2024 at 10:13=E2=80=AFAM Gerd M=C3=B6llmann wrote: > Works fine for me on macOS 15.1/tty with clangd 19.1 from Homebrew. > Thanks, that's a nice feature! > > You said you are interested in feedback, so here's my wishlist :-). > > - I'd preferred a global minor mode to turn this on and off. > Which would replace the manual adding to the Eglot hook. Thanks for the very welcome feedback! My idea was to keep this local as it hooks into fontification and wanted to limit any problems that may arise only to the buffers where the mode is enabled. This by the way was only possible with c-ts-mode as cc-mode chains into the default function in its fontify-region hook, so if I want to run my code after theirs it must be inherently global. Guess the same could be achieved by defining a global minor mode and adding eglot/c mode hooks myself but I'd like to leave the control to the user for now. > - I think something is to be up with the faces? If I remove > > (clangd-inactive-regions-set-method "darken-foreground") > (clangd-inactive-regions-set-opacity 0.55)) > > the inactive regions are not shown, I think. If I put them in, they > are. Thanks, always had those in the init and never noticed. Should be fixed now, could you test again? > - Maybe some of the defvar could be defcustoms? Agreed, will look into it. Filippo