From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Dmitry Gutov Newsgroups: gmane.emacs.devel Subject: Re: Adding support for xref jumping to headers/interfaces Date: Mon, 6 Mar 2023 15:46:33 +0200 Message-ID: References: <1587ddb6-f631-0890-965a-c7acb5729fa6@yandex.ru> <87r0u2ax26.fsf@betli.tmit.bme.hu> <253cdcdd-863e-e8e3-a783-62ce1c570cfb@yandex.ru> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="8836"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.7.1 Cc: Felician Nemeth , John Yates , Helmut Eller , emacs-devel To: =?UTF-8?B?Sm/Do28gVMOhdm9yYQ==?= Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Mon Mar 06 14:48:04 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 1pZBC4-0001yA-JK for ged-emacs-devel@m.gmane-mx.org; Mon, 06 Mar 2023 14:48:00 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pZBAn-0000uV-Py; Mon, 06 Mar 2023 08:46:41 -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 1pZBAl-0000uD-2c for emacs-devel@gnu.org; Mon, 06 Mar 2023 08:46:39 -0500 Original-Received: from mail-wr1-x429.google.com ([2a00:1450:4864:20::429]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pZBAi-0003OF-Sn for emacs-devel@gnu.org; Mon, 06 Mar 2023 08:46:38 -0500 Original-Received: by mail-wr1-x429.google.com with SMTP id v16so8925368wrn.0 for ; Mon, 06 Mar 2023 05:46:36 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; t=1678110395; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :sender:from:to:cc:subject:date:message-id:reply-to; bh=OaKMV/ek243aZgGbWsq9i238ETYDxpibtnYGQSyw73E=; b=H0khqCqw5m/L8GXqCc/5haAdZ4nxDk8U2DUOYcGjKcFSgZlunbTXvV9PWbLwTSTdzB JvW/zVMwqJHvCBchOuOkBnKQp+Cf+PJaxL2jKQ9KemV6/2R0XwZSpYvlbzC8ddJrVTHa xswmtsBUwDijOn2YR3dgncp6NruQ4l/whoVprKhfR9tqTgVh/3a27dyVvrVTdYG1nqfp y2Bve6EZmwf6RqMA+yN4F+hfO2TrpawHrf88fi+XStPMIF00fSYxr02Pbmk8MapjVjAP M/XF6VOV1VR3lHy4FSnQ8XCb04ief5QsQpc1rTdp/lkoXLU2g7ln9MLBoxKN42aGj+kZ zINg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1678110395; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :sender:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=OaKMV/ek243aZgGbWsq9i238ETYDxpibtnYGQSyw73E=; b=FvbAtFf9p+0R2lHb5KZYOMPqutwkb7rzB4jTcmogjv3HTP+6JdfpKVE5fLI0mBWath nxZVcjM5AMZSk3em/YYh3MdyMUnoY84z8yov1cBpPvdEiglk43kd/Cl4QipIBB1lmVmu w+b8LAN3+0ydxBYI4dM1HbzPdW3rZQT2rLxJbeKz8Ssw5dEc0/IPQnH9Ynwz6404pkTG ycvlFVZSqlHQPvxN9XYkUGKDy+pAAWUlTJVcDZgGGuYgzCg9Ul4IRlk2yHb/elBStdfG amT8/yuq8DZfUXcSiLgRWeYpz+bNmzUikHJQW0hMRjE+iOSnwqbFJMH4qxCb6E9n248t IwhA== X-Gm-Message-State: AO0yUKU5uSdjpdyo0Wxu1I6+REQBAbDHN6qhHEa7Cl54w4XBUeBLjgwb Z5Btr74++KnqNI4KNlptg+I= X-Google-Smtp-Source: AK7set8/PHcogSSZntXxQZUvEdG50V67RYtvWCehJx57aAQg73wO/ZET+39Vp2FJ85/OHIX+r3M3Gw== X-Received: by 2002:a5d:4f82:0:b0:2c3:d032:5b29 with SMTP id d2-20020a5d4f82000000b002c3d0325b29mr7951171wru.12.1678110395288; Mon, 06 Mar 2023 05:46:35 -0800 (PST) Original-Received: from [192.168.0.2] ([46.251.119.176]) by smtp.googlemail.com with ESMTPSA id h18-20020a5d4312000000b002c7107ce17fsm10081724wrq.3.2023.03.06.05.46.34 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 06 Mar 2023 05:46:34 -0800 (PST) Content-Language: en-US In-Reply-To: Received-SPF: pass client-ip=2a00:1450:4864:20::429; envelope-from=raaahh@gmail.com; helo=mail-wr1-x429.google.com X-Spam_score_int: -14 X-Spam_score: -1.5 X-Spam_bar: - X-Spam_report: (-1.5 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FORGED_FROMDOMAIN=0.25, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.25, NICE_REPLY_A=-0.001, 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:304044 Archived-At: On 06/03/2023 15:38, João Távora wrote: > I think that is doable, yes. The question is whether to use the LSP > names for them or our "own" names. I think I prefer the former, to > avoid concept creep. So M-x xref-find-extra would offer > "textDocument/findImplementation", "textDocument/findDeclaration", > etc when backend reports these operation names (which in turn it does > if the server has the associated LSP capability). I think we'll need readable names -- e.g. "implementations", "declarations", "type definitions" (with a space or dash, maybe), without the confusing "text document" stuff. Anyway, if the list of types will be extensible, there'll be nothing to stop you from using any particular naming format. > Other non-Eglot backends would report other operation names, > but that's fine as long as whoever reports them also knows > how to handle them. I think the idea is to report the names of "things" that can be found. > The consistency would be in the single xref-find-extra binding. > The LSP names are clear enough and we can even decamelify them > automatically to be nicer to the camelically disinclined like > myself. And remove the "textDocument/find" prefix. But, again, that's up to you.