From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: Eglot "inlay hints" landed Date: Thu, 23 Feb 2023 19:17:44 +0200 Message-ID: <83k008pah3.fsf@gnu.org> References: <83edqqaf8c.fsf@gnu.org> <2B284D77-97DF-4B3E-89FB-13F0CA93D240@gmail.com> <87356xv65z.fsf_-_@gmail.com> <83fsawriye.fsf@gnu.org> <835ybsr6aa.fsf@gnu.org> <83356wr224.fsf@gnu.org> <87bklktu89.fsf@gmail.com> <83y1oophd0.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="36930"; mail-complaints-to="usenet@ciao.gmane.io" Cc: dalal.chinmay.0101@gmail.com, emacs-devel@gnu.org, dimitri@belopopsky.com, luangruo@yahoo.com To: =?utf-8?B?Sm/Do28gVMOhdm9yYQ==?= Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Thu Feb 23 18:18:21 2023 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 1pVFEb-0009Nv-3g for ged-emacs-devel@m.gmane-mx.org; Thu, 23 Feb 2023 18:18:21 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pVFE7-0003Fx-Bh; Thu, 23 Feb 2023 12:17:51 -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 1pVFE5-000394-Mw for emacs-devel@gnu.org; Thu, 23 Feb 2023 12:17:50 -0500 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pVFE5-0005b2-BA; Thu, 23 Feb 2023 12:17:49 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-version:References:Subject:In-Reply-To:To:From: Date; bh=hxIesuuHR+yl6QDh080wXqblWSRaFeEQi4wqejlVhkA=; b=nj+4AU4VAdesXPzJCiQi QVHHJZx2Nb5Zn3xiiw2sdm2KUp2c4xWyfG9GdT2ZtDfsP9kEF2tMSH9/w9lFXeXxpmYJA6oqXFdlY Jc0n6cPA0AT8+AiASz+mjrUaTph8M31uYD2dYyy2PaBobO7UXCSTYPjiRBdzJNzfy00XsWDPhf0Ac f+aF3cTkPWHluZYHKmo1yRVzMTQW+761WqRltoZOdzSr2p6KRaMJQ0HwnInNP01g7HNzIdoxjZdFS oxwwRuDlIet1UGBadiXcxYWtYGDwToe66F0JbamjF92uEA9Mmm8nGxmZB5pjoD2FJLS3kChWnJ/Ge 95ALXtsRjbqD9Q==; Original-Received: from [87.69.77.57] (helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pVFE4-0006wm-BG; Thu, 23 Feb 2023 12:17:48 -0500 In-Reply-To: (message from =?utf-8?B?Sm/Do28gVMOhdm9yYQ==?= on Thu, 23 Feb 2023 16:09:24 +0000) 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:303711 Archived-At: > From: João Távora > Date: Thu, 23 Feb 2023 16:09:24 +0000 > Cc: dalal.chinmay.0101@gmail.com, emacs-devel@gnu.org, dimitri@belopopsky.com, > luangruo@yahoo.com > > > If there's a change in A that affects B, jit-lock will call > > fontification-functions in both A and B, each one when it's about to > > display the corresponding window. > > Sure, but you're in charge of coding up the "affection" by asking > the LSP server. In other words, only the LSP server knows that the > change in A affects B. You must assume that it does and ask it "Hey LSP > server, given that I've just changed document A, in your document B from > 42 to 420 is are there any new or different inlay hints you'd like to > give me?" jit-lock cannot foresee that upfront, it will only act on B's > display if B's buffer is changed. That's no for jit-lock to do. And I don't see how it could be relevant to the issue we are discussing. How do you do this now? > Regardless of that separate issue, I started experimenting with > jit-lock-register. It's promising, but has problems. That might be so, but one problem it does NOT have is missing the cases when you MUST ask the LSP server, because something is going to change on display. window-scroll-functions cannot promise that, since they are only called "when the window is scrolled", and there's more to that condition than meets the eye, believe me.