From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Chinmay Dalal Newsgroups: gmane.emacs.devel Subject: Re: Eglot "inlay hints" landed Date: Thu, 23 Feb 2023 10:59:17 +0530 Message-ID: References: <83edqqaf8c.fsf@gnu.org> <2B284D77-97DF-4B3E-89FB-13F0CA93D240@gmail.com> <87356xv65z.fsf_-_@gmail.com> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="14253"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: mu4e 1.9.1; emacs 30.0.50 Cc: emacs-devel@gnu.org, Dimitri Belopopsky , Po Lu , Eli Zaretskii To: =?utf-8?B?Sm/Do28gVMOhdm9yYQ==?= Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Thu Feb 23 07:01:13 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 1pV4fI-0003a2-TM for ged-emacs-devel@m.gmane-mx.org; Thu, 23 Feb 2023 07:01:12 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pV4eW-0000UU-7N; Thu, 23 Feb 2023 01:00:24 -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 1pV4Fi-0005C9-Bi for emacs-devel@gnu.org; Thu, 23 Feb 2023 00:34:46 -0500 Original-Received: from mail-pj1-x102d.google.com ([2607:f8b0:4864:20::102d]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pV4Fg-0005Uk-R6; Thu, 23 Feb 2023 00:34:46 -0500 Original-Received: by mail-pj1-x102d.google.com with SMTP id oe18-20020a17090b395200b00236a0d55d3aso11269081pjb.3; Wed, 22 Feb 2023 21:34:43 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:message-id:in-reply-to:date:subject:cc:to:from :user-agent:references:from:to:cc:subject:date:message-id:reply-to; bh=KFY1GSefH1qbShuuRkGgQrLmKIZCOskP92FmZG9fZCQ=; b=mVftCUKioxy6PRgxk/zMRAmjkXETbuPmdcN1ylm2PCRoB7GTAlheSBUx961Cro7WhU yZvcqkQfqNTz9kexOQnbZb89kWbRFHYi7x9RYVvYkf84HW2j9KI1r+5FRWhnZ+clG7YU PPpw+lhDDMTUDpm0RhfvxvkzOaLVFLKNcU76pGEBPx0wk8cWMJyRgmqzwEyqXbQ7TD/T FmvG3JBIGSQ9g+DAf8bAHrkc4vXRM8ETiZJqvfJHtyy6ZmcO33xNtti2SVcMUBNQeWU9 EuO8c5WPgEmHDo9gKCuPtRKx2RBgNdnmz9FDZlhlbU6SNpYIKxqjrdUK747THkRYjesh OX8w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=mime-version:message-id:in-reply-to:date:subject:cc:to:from :user-agent:references:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=KFY1GSefH1qbShuuRkGgQrLmKIZCOskP92FmZG9fZCQ=; b=4rTf1QeauCi+0+eUiF3jdQmcqh6sY7ac83NcNx/63B+NtrDZ6vnjzJYFL/0lSW7Qz1 8fIOMB4ILEZfB9VJ4OBQ+ca/jO2miIXwkBFQMrj067yhEKqb3wxQgDFaCkCz6zOC4UHT +I3JpNzumeV4SBhxh/eikLC/9E2d7StV857Et5DMeAIXoSUAUCVupj+kqe4wSbr+KXxt 4rcvnYXIMRncd2pbZL8jO8TNkWW51d43yV5GzuoEIYo2I0uXteB1HDLZmWQr1/nwBGjn y7VgLULXnESB7skFmoivaivJnJUI18rIBDkNETk/4TF8XkzeT4phceYlGzZZ1/QjZ9iw QD7g== X-Gm-Message-State: AO0yUKW24VuJxbMCBAPOx2cuod/uniKBoghoS40vZem+xyU2t/5ddM7i 26xJgttv5UQrVUWh5wxbqLT1MAz35+9ejw== X-Google-Smtp-Source: AK7set+HlReXJalOHLxXf5H5hJlfhSBrTIuvpdV5GY27Ei//dJVJzZrnv1Zf6PxwJWxYGVlboywcdw== X-Received: by 2002:a17:90b:4a4d:b0:236:73e8:f53 with SMTP id lb13-20020a17090b4a4d00b0023673e80f53mr13465856pjb.19.1677130482342; Wed, 22 Feb 2023 21:34:42 -0800 (PST) Original-Received: from ganymede ([115.244.45.193]) by smtp.gmail.com with ESMTPSA id x7-20020a17090a294700b00234899c65e7sm5799844pjf.28.2023.02.22.21.34.40 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 22 Feb 2023 21:34:41 -0800 (PST) In-reply-to: <87356xv65z.fsf_-_@gmail.com> Received-SPF: pass client-ip=2607:f8b0:4864:20::102d; envelope-from=dalal.chinmay.0101@gmail.com; helo=mail-pj1-x102d.google.com X-Spam_score_int: -17 X-Spam_score: -1.8 X-Spam_bar: - X-Spam_report: (-1.8 / 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_ENVFROM_END_DIGIT=0.25, 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-Mailman-Approved-At: Thu, 23 Feb 2023 01:00:06 -0500 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:303691 Archived-At: Thanks, this works well. > Since inlay hints are potentially a large amount of data to request from > the LSP server, the implementation strives to be as parsimonious as > possible with these requests. > > So, by default, inlay hints are only requested for the visible portions > of the buffer across windows showing this buffer. This is done by > leveraging the 'window-scroll-functions' variable, making for a > reasonably complex implementation involving per-window timers. When > scrolling a window, it may take a short amount of time for inlay hints > to "pop in". Can it be instead done in such a way that initially (when loading a new file) they are requested for the whole buffer, then on subsequent changes they are only requested for the visible regions. This has some edge cases like pasting a huge block into a selected region (here, text will be changed beyond what is currently visible so it will take some time when someone scrolls to that region) but IMHO it seems strictly better than the present. Chinmay