emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Eglot "inlay hints" landed


From: Eli Zaretskii
Subject: Re: Eglot "inlay hints" landed
Date: Thu, 23 Feb 2023 19:17:44 +0200

> From: João Távora <joaotavora@gmail.com>
> 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.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]