From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: =?UTF-8?B?Sm/Do28gVMOhdm9yYQ==?= Newsgroups: gmane.emacs.devel Subject: Re: Eglot "inlay hints" landed Date: Fri, 24 Feb 2023 12:26:19 +0000 Message-ID: References: <87356xv65z.fsf_-_@gmail.com> <83fsawriye.fsf@gnu.org> <835ybsr6aa.fsf@gnu.org> <83356wr224.fsf@gnu.org> <87bklktu89.fsf@gmail.com> <83y1oophd0.fsf@gnu.org> <83k008pah3.fsf@gnu.org> <83y1ono6rg.fsf@gnu.org> <83o7pjnvre.fsf@gnu.org> 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="25317"; mail-complaints-to="usenet@ciao.gmane.io" Cc: monnier@iro.umontreal.ca, dalal.chinmay.0101@gmail.com, emacs-devel@gnu.org, dimitri@belopopsky.com, luangruo@yahoo.com To: Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Fri Feb 24 13:27:35 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 1pVXAl-0006QO-5K for ged-emacs-devel@m.gmane-mx.org; Fri, 24 Feb 2023 13:27:35 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pVX9n-000539-AX; Fri, 24 Feb 2023 07:26:35 -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 1pVX9l-00052K-Cq for emacs-devel@gnu.org; Fri, 24 Feb 2023 07:26:33 -0500 Original-Received: from mail-oi1-x236.google.com ([2607:f8b0:4864:20::236]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pVX9j-0002SG-NZ; Fri, 24 Feb 2023 07:26:33 -0500 Original-Received: by mail-oi1-x236.google.com with SMTP id y184so1492002oiy.8; Fri, 24 Feb 2023 04:26:31 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; t=1677241590; 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=I5nRnks2zKa+7JThxkKwWpmY3aXm9P31rRpor/avV+A=; b=kXKScl5iP+LDHsOlfouNiIr6gVTm28lkPtNxGy/Naxc4NPxoi6Yh1vdcf0x9+MufYM O4Crb8r7wOcDfBS7wOMetqnddPKNXX1hxq/pn+fwYP8hGzgzhArurcwf1Zz81mlkoC+j 5Si5Legr4uSRdCptBFyRRfPEAJbyVnrvcHx7NqgEneCiGWw7cqqYWDFy6F0O7uS+Hfsn RhCAokLNbsOjcyVixzCg7RvoLtuGWEt0Wl9lLiBD5Jvls9DaBc4yZkwKAzwRsL/MZCds zdrahhnWKzn44SlFibOGLyiCeVLXb4vzr2SgC6QaXq8ywldrFdGnqud5DzPna3HdyQxL e7rA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1677241590; 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=I5nRnks2zKa+7JThxkKwWpmY3aXm9P31rRpor/avV+A=; b=AoFt2QO0Cm17tave9ByU7DVzitTkQR8pmpmOBaU0NUlW9Aq0MmWTera7Jt+WwoWI6t ZY+yoyc50tMdwUy0J97anMGXWt+dQOnSpuYBIUTqLUaCvZMMV+TpR3grxBGNE9ae2SpL Wzd4xr17cvRGIKjvYq+MFrMqVEaENav/sDOT5vMfQJTvq8dqOF6mqdZxvv0R6b6oQgTr d2H0ki7yee4C8i2BphbdNC+e62+D/OhHvz8S4tIygUvDYmG1nLd2/LY/57NQDQ6Bd/5u kom/Tl3SaTvLbCAuqxyKXRxQ7UDnhZ/bFFgnR2UBLAJN1+mZYh/1mGZBomxNzq3lfWPy oBUg== X-Gm-Message-State: AO0yUKUA/OnLjUcjAMnldE20pcgMg7S+sXSJQjal0EIXrz9iYdzUuOoa JaeGzz/zx1/Y0oHQYKqjMnmUlXpBYhndJ+nKHrwbNC9n5x4= X-Google-Smtp-Source: AK7set8QTupCaTcfK96U7Dd8WwjeB+Rlg/yiehGhrq90yJfUiVge4KQeZ4Ttxj/zfUdkk3Imr0WDqRGYxE8nP2m5kGo= X-Received: by 2002:a54:4193:0:b0:37d:6c5a:15bc with SMTP id 19-20020a544193000000b0037d6c5a15bcmr984907oiy.8.1677241589956; Fri, 24 Feb 2023 04:26:29 -0800 (PST) In-Reply-To: <83o7pjnvre.fsf@gnu.org> Received-SPF: pass client-ip=2607:f8b0:4864:20::236; envelope-from=joaotavora@gmail.com; helo=mail-oi1-x236.google.com X-Spam_score_int: -10 X-Spam_score: -1.1 X-Spam_bar: - X-Spam_report: (-1.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, FREEMAIL_REPLY=1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no 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:303750 Archived-At: On Fri, Feb 24, 2023 at 11:33 AM Eli Zaretskii wrote: > > > From: Jo=C3=A3o T=C3=A1vora > > Date: Fri, 24 Feb 2023 10:42:26 +0000 > > Cc: Stefan Monnier , dalal.chinmay.0101@gmail= .com, > > emacs-devel@gnu.org, dimitri@belopopsky.com, luangruo@yahoo.com > > > > On Fri, Feb 24, 2023 at 7:35 AM Eli Zaretskii wrote: > > > > > > If a jit-lock client is smart enough, it should itself install an > > > after-change function to remove the 'fontified property from the > > > portions of buffer text affected by a change that are before the firs= t > > > changed position (or maybe even in other buffers). > > > > Thanks, I was going to ask about that. I suppose this is how one > > marks sections of a buffer "dirty" or invalidatest them so that > > jit-lock knows it must run over them again when it sees fit. > > > > If it works with other buffers as well, it might provide an > > elegant solution to the "A affects B" scenario we discussed > > earlier. > > I don't see why it wouldn't work. Yes. I never said it wouldn't :-) (and you never said I said, I'm just clarifying :-). Anyway, there is also this to this topic. https://microsoft.github.io/language-server-protocol/specifications/lsp/3.1= 7/specification/#workspace_inlayHint_refresh an "inlay hint refresh request" from the server. A separate capability apparently designed to cover this case. I don't know how it fits into the equation but I would think it was designed for editors with none of our jit-capabilities. Maybe it's mostly useless to us now, especially given its poor interface (it's just a bare request with no parameters). It does illustrate the typical LSP line of reasoning: "the server knows best, because the server knows the language". IOWs the LSP server knowledge stands for Emacs major-mode knowledge. The difference here is that the interfaces to extract that knowledge from the server are very limited or poorly designed. Jo=C3=A3o