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 09:59:29 +0000 Message-ID: References: <83edqqaf8c.fsf@gnu.org> <2B284D77-97DF-4B3E-89FB-13F0CA93D240@gmail.com> <87356xv65z.fsf_-_@gmail.com> <87zg94kvoq.fsf@gmail.com> 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="28091"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Nikola Pajkovsky , emacs-devel@gnu.org, Dimitri Belopopsky , Po Lu , Eli Zaretskii To: Chinmay Dalal Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Fri Feb 24 11:00:43 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 1pVUsd-0007Ck-DU for ged-emacs-devel@m.gmane-mx.org; Fri, 24 Feb 2023 11:00:43 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pVUro-0005QV-QP; Fri, 24 Feb 2023 04:59:54 -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 1pVUrf-0005PQ-Nl for emacs-devel@gnu.org; Fri, 24 Feb 2023 04:59:44 -0500 Original-Received: from mail-oi1-x230.google.com ([2607:f8b0:4864:20::230]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pVUre-0002HZ-2g; Fri, 24 Feb 2023 04:59:43 -0500 Original-Received: by mail-oi1-x230.google.com with SMTP id bk2so14540754oib.10; Fri, 24 Feb 2023 01:59:41 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; t=1677232780; 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=uPOQuF9uMRf1//r5UiWQpVlZncBNeMG4uaYQlOTQ3d8=; b=eSTBLWYf1lNUCd102SP66Zvi0TnUHXjM7X2OBjnRKLJtZxW1rWG6BSIizzkTdmoZkI YwmsB+0+KOZwuVboIg5Rsp1Okkh13wsb3SnHQO5M6qHSZUFfwWSTELg/0HkEkUIXFrRG CZ28RyrAERoAC63v4hOXm5YyVc8qehp6LGPXMWZVulTT3SJNaPr8JGwp9dXFUCLEdq7B LnCofFjlwfzWeq0ea1rC2PHzXZ/Vo9n1teeu3ZkURknWpUu+Rx29Nu6/nPWg5j5zkVgM SMyL3X6iPJdloxKMofDUoERX1XxzLF7u9uPnSIc/maHxIQQj0VLDeD/ynGG3Nnd9HpA6 VSFw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1677232780; 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=uPOQuF9uMRf1//r5UiWQpVlZncBNeMG4uaYQlOTQ3d8=; b=VTvnF9zohMXD2IO4lYf9qhRp35a5wAYD1yGruEV44x7nuveDDnJw2ALw2nMPSOqb9P GrQWh7kuMtTlUVYwntwynBd51RSESa10hl6Ge5BcS7NNs7ZvH4FBmWZ8xOlZ9kWy+Vgb wPo6msyYfJlEG9959Y6Dvnq/9axnUWtTLY/cwm8RwTCHSP7CAMlkWe965atBzr46faXq ZlTQZN9L3wwrz3U4PwRmRTAi5a7uRZePYMrZf+epID3bhHndJp/ZcWbRZLE1JJCfw63n 60FhDX/oem38MRMRIcCQn4UF9NfS4MGAY87Z1A+ORxwEsNmOo5rZ+ZAuXDPlI+C7rEsA ETIw== X-Gm-Message-State: AO0yUKWaQzmwBJEYc9w/v7aVwBR2sOTsFFmjI3aiytNDW0jv9h1XoOhQ dLLm+Em710GK01PSgrzaxo39hJYKUdr6lFBHtto= X-Google-Smtp-Source: AK7set8EKplsaupdnUj+9pwtbru2gmMPbo6R4oflOFQJNy0385HfKoPY+7KXmV1QufslRQiGRFh9ANpOX55rbGUVxOA= X-Received: by 2002:a05:6808:1b2b:b0:383:f981:b1e5 with SMTP id bx43-20020a0568081b2b00b00383f981b1e5mr482630oib.5.1677232780389; Fri, 24 Feb 2023 01:59:40 -0800 (PST) In-Reply-To: Received-SPF: pass client-ip=2607:f8b0:4864:20::230; envelope-from=joaotavora@gmail.com; helo=mail-oi1-x230.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.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, 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-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:303744 Archived-At: On Fri, Feb 24, 2023 at 4:30 AM Chinmay Dalal wrote: > You can look at the end of any long rust function with hl-line-mode on: > there's an empty overlay but it's supposed to have a link to the > beginning of the function. Screenshot attached. > > I think the bug is in eglot--update-hints-1: > > (if (stringp label) label (plist-get label :value)) > > It should instead be the value of :value from the _first element_ of > label, as the spec says a label is a string or a _list of_ `InlayHintLabe= lPart`s: Nice catch! Indeed I missed that. > Of course, this is not ideal when there are multiple elements in the > label list (but not strictly wrong either). Yeah, for now let's stick to the first. I don't know how to interpret "multiple hints" for the same "language element", in Emacs at least. What do other editors do? > Also, can the clickable link be actually implemented using the `keymap` > property of overlays: > https://www.gnu.org/software/emacs/manual/html_node/elisp/Special-Propert= ies.html#index-keymap-of-character > instead of just displaying the text? Probably yes. Jo=C3=A3o