|
From: | Dmitry Gutov |
Subject: | Re: Adding support for xref jumping to headers/interfaces |
Date: | Mon, 6 Mar 2023 15:46:33 +0200 |
User-agent: | Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.7.1 |
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.
[Prev in Thread] | Current Thread | [Next in Thread] |