From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Dimitri Belopopsky Newsgroups: gmane.emacs.devel Subject: Re: Eglot "inlay hints" landed Date: Thu, 23 Feb 2023 14:25:49 +0100 Message-ID: References: <83edqqaf8c.fsf@gnu.org> <2B284D77-97DF-4B3E-89FB-13F0CA93D240@gmail.com> <87356xv65z.fsf_-_@gmail.com> <83fsawriye.fsf@gnu.org> Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="0000000000001ec6ad05f55df45e" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="26700"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Chinmay Dalal , Eli Zaretskii , emacs-devel@gnu.org, 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 15:50:29 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 1pVCvU-0006hL-Pn for ged-emacs-devel@m.gmane-mx.org; Thu, 23 Feb 2023 15:50:28 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pVCvG-0000j7-HD; Thu, 23 Feb 2023 09:50:14 -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 1pVBbr-0004GK-MB for emacs-devel@gnu.org; Thu, 23 Feb 2023 08:26:07 -0500 Original-Received: from mail-qt1-f174.google.com ([209.85.160.174]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pVBbm-00012E-Qw; Thu, 23 Feb 2023 08:26:07 -0500 Original-Received: by mail-qt1-f174.google.com with SMTP id w42so10626873qtc.2; Thu, 23 Feb 2023 05:26:00 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=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=Dr4BIB+Qp2EfWi3qnvBJ/56VskeEwXJQv3GNSGVfd5A=; b=btOq0diqDy1u4YVfQpUE1yUUw8jVsDygdk9lAAwPzK5l6TOXMGhPDdqwFmDzUQsiJj XKKKjlr57+0SliAqGTJTICP8jCJzJsels39EbE/UUjQHtja+owCcfeY24qJsYnN2ugua Rheh7c7FjeSVah/C16WdwxRz1Pt5oIMO5LRFS8VR30OzD+N75uf3cG2fhjqFdRxJRzCy IqaGfER0OGyYYdMgZbk0PDEghgXmaZYOu5znV7ayCy5hR0x/9FEMzI9e6euf3oiiF+Tw D29/wkKUfeYIqgeUU4DKM96+lzN4QlhhyEKUjQLX9HLndr4qm+GeR3ThcsxPNeYZXRHm O8LQ== X-Gm-Message-State: AO0yUKV751of2doRltHUYbbr8UHd4OBzVV1MlNCRh8/Aq9qWhzBHWeJz 3r8ZJgu82RGU2FaBW75CnyAgZWwoiPI3n5stQk0= X-Google-Smtp-Source: AK7set9zXqyALR71ztaGAK/qDbuNDBSC8vvY7+C3NWK6gZ8yFxAd7FWQD7kqB3XgJ9x4rm7Fg1jAWPZxysqhKO/brRQ= X-Received: by 2002:a05:622a:4107:b0:3bd:1b6:9d3d with SMTP id cc7-20020a05622a410700b003bd01b69d3dmr2568204qtb.4.1677158759973; Thu, 23 Feb 2023 05:25:59 -0800 (PST) In-Reply-To: Received-SPF: pass client-ip=209.85.160.174; envelope-from=dimitribelo@gmail.com; helo=mail-qt1-f174.google.com X-Spam_score_int: -13 X-Spam_score: -1.4 X-Spam_bar: - X-Spam_report: (-1.4 / 5.0 requ) BAYES_00=-1.9, FREEMAIL_FORGED_FROMDOMAIN=0.25, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.25, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-Mailman-Approved-At: Thu, 23 Feb 2023 09:50: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:303707 Archived-At: --0000000000001ec6ad05f55df45e Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Thu, 23 Feb 2023 at 13:05, Jo=C3=A3o T=C3=A1vora = wrote: > On Thu, Feb 23, 2023 at 10:55 AM Dimitri Belopopsky > wrote: > > > > Inlay hints are working well on my end! > > The only issue I seem to be having is when the server doesn't support > inlay hints, and I have " (add-hook 'eglot-managed-mode-hook > #'eglot-inlay-hints-mode)" in my config. > > > > It keeps erroring in this case and the connection to the lsp server > seems to terminate in some cases. In any case it causes interference with > other things, like completion which can stop working. > > > > You can try it with pylsp, and add "(add-hook 'eglot-managed-mode-hook > #'eglot-inlay-hints-mode)" to your config. Trying to write a simple main > function will show issues. > > I can't reproduce this with this server. All I see is a warning: > > Warning (eglot): No :inlayHintProvider support. Inlay hints will not work= . > > which is how it's supposed to work. > > Jo=C3=A3o > My bad... I'm using straight.el, and somehow it wasn't picking things correctly. Forcing it to use the built-in variant makes everything work correctly. --0000000000001ec6ad05f55df45e Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable


=
On Thu, 23 Feb 2023 at 13:05, Jo=C3= =A3o T=C3=A1vora <joaotavora@gma= il.com> wrote:
On Thu, Feb 23, 2023 at 10:55 AM Dimitri Belopopsky
<dimitri@bel= opopsky.com> wrote:
>
> Inlay hints are working well on my end!
> The only issue I seem to be having is when the server doesn't supp= ort inlay hints, and I have " (add-hook 'eglot-managed-mode-hook #= 'eglot-inlay-hints-mode)" in my config.
>
> It keeps erroring in this case and the connection to the lsp server se= ems to terminate in some cases. In any case it causes interference with oth= er things, like completion which can stop working.
>
> You can try it with pylsp, and add "(add-hook 'eglot-managed-= mode-hook #'eglot-inlay-hints-mode)" to your config. Trying to wri= te a simple main function will show issues.

I can't reproduce this with this server.=C2=A0 All I see is a warning:<= br>
Warning (eglot): No :inlayHintProvider support. Inlay hints will not work.<= br>
which is how it's supposed to work.

Jo=C3=A3o

My bad... I'm using strai= ght.el, and somehow it wasn't picking things correctly. Forcing it to u= se the built-in variant makes everything work correctly.
--0000000000001ec6ad05f55df45e--