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: Adding support for xref jumping to headers/interfaces Date: Mon, 6 Mar 2023 13:15:17 +0000 Message-ID: References: <1587ddb6-f631-0890-965a-c7acb5729fa6@yandex.ru> <87r0u2ax26.fsf@betli.tmit.bme.hu> 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="39599"; mail-complaints-to="usenet@ciao.gmane.io" Cc: John Yates , Dmitry Gutov , Helmut Eller , emacs-devel To: Felician Nemeth Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Mon Mar 06 14:15:58 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 1pZAh4-000A4p-RT for ged-emacs-devel@m.gmane-mx.org; Mon, 06 Mar 2023 14:15:58 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pZAgf-000791-Bg; Mon, 06 Mar 2023 08:15:33 -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 1pZAgd-00077w-QB for emacs-devel@gnu.org; Mon, 06 Mar 2023 08:15:31 -0500 Original-Received: from mail-ot1-x329.google.com ([2607:f8b0:4864:20::329]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pZAgb-0004Nn-M9 for emacs-devel@gnu.org; Mon, 06 Mar 2023 08:15:31 -0500 Original-Received: by mail-ot1-x329.google.com with SMTP id g73-20020a9d12cf000000b006943a7df072so5246167otg.11 for ; Mon, 06 Mar 2023 05:15:29 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; t=1678108528; 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=bp7JQxb+om6m3HzM3dkHujjbeBm4SECPKjxSxXdYL4U=; b=MGB0/lnnq+qxqBKjJGYiPtt1DrBGDzPefVgO1Kykwtyko43Z8N7n7/THXMz8EoRfQF z5JUWmvm2oJjad+/wTvD+OdTJPDwspgnFQI14hQzOLcb0YBpZnhcEFpvUmj8OPzgTy/y 7xwW4t2RQ3fdJTDk9MzYKMA+vJPE+wTaYLvqBI0WNQd+F1Q35QnqX3VQCShNkVaJ1u0c jd9iMtclYQnuMN0vgBGK3IOvn8+scrJEvXIND3f/MxXOIRst09w9quTDopFukzXUp2Xz W4pWI89eGZAVzj/tQo/plMbzKloW7UrOegbwbWR9aicV9pCo+1YktLc83uuqRQx27VIN QNnA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1678108528; 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=bp7JQxb+om6m3HzM3dkHujjbeBm4SECPKjxSxXdYL4U=; b=0CdtSCDVeUKLdVqQcbYMfviXncK4ftfk+v/weB0Bo2XUZHlxAnrfNSMvv+6OpYltfs Vw2ijk/j2HThyHEh6II3FUiZQquTXML6rx1U7OcVYLp6wXxtOuxlt3Chs/0BuDH3kAsM 4f4FMG/YmxfsFBlpzddRUFQbKbb5rSFz826S65KM0x1IKhs7hvuvk6HXD0yuyP4+7Q8e qfQ3bsZiBjDeFl2L9hwzf45cEiQdV2mgIeAVG+1oh8B3u/EjQoD0RppkQHD5FxijWw6P r9HFG9c8fgdbziLkYAvvf/3+OJNLO4sf0PphixY62XnCSrM59AzjpGoQXwatl/1sidZL NhGQ== X-Gm-Message-State: AO0yUKUcM30GkcXg/3mVW7Wq5jyZSybOha6ICidtnH7JnqrKhrdwDYYF IBz9M18VhfRGLLqM3jy4BUtk4MVEYOgI7dLXKCs= X-Google-Smtp-Source: AK7set8QxZqxHfCeX8Gj/P7FaWwgNsNLuG6l/YbMp8XiZntk1vJwk43rrZJa29n+d+CeXmuc9uYqX42djV+UXOnHYN4= X-Received: by 2002:a9d:7259:0:b0:690:f512:20a with SMTP id a25-20020a9d7259000000b00690f512020amr3386846otk.3.1678108528290; Mon, 06 Mar 2023 05:15:28 -0800 (PST) In-Reply-To: <87r0u2ax26.fsf@betli.tmit.bme.hu> Received-SPF: pass client-ip=2607:f8b0:4864:20::329; envelope-from=joaotavora@gmail.com; helo=mail-ot1-x329.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:304041 Archived-At: On Mon, Mar 6, 2023 at 12:23=E2=80=AFPM Felician Nemeth wrote: > > Can you, please, consider adding more than just one new xref command? > The Language Server Protocol defines jump-to-declaration, > jump-to-implementation, and jump-to-typeDefinition commands as well. > > ---- > > I can image a new xref-find-extra command that provides a > `tmm-menubar'-like single key selection for the specific jump type. The > list of jump-types could be filled up by Eglot or major-modes (ada-mode > would add "specifications", ocaml-mode would add "interface"). If C-M-? > is bound to this new xref-find-extra, then "C-M-? i" would jump to the > interface definition in ada-mode, and "C-M-? d" would ask the LSP server > for declarations in case of Eglot. > > (Users who find "C-M-?" awkward can rebind xref-find-extra to "s-.") > > What do you think? To me, the "find extra" trampoline idea sounds nice too. It doesn't suffer from the drawback of adding "interface", "implementation", "typeDefinition", "superSpecificLanguageConstruct" concepts to xref.el in poorly-scalable fashion. Jo=C3=A3o