|
From: | Dmitry Gutov |
Subject: | Re: Xref completion |
Date: | Thu, 19 Nov 2020 03:43:40 +0200 |
User-agent: | Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.10.0 |
On 18.11.2020 20:47, João Távora wrote:
I'd just like to note that in certain applications (like SLY/SLIME where this request hails from), sometimes xrefs are grouped not by file, but by type (a symbols'sreferences includes "who sets", "who calls", "who reads", and so on) . So if possible, and in general, this type of solution should be thought as "prepend/append group name". There can even be multiple grouping strategies.
We don't currently support group nesting, do we? I'm not sure how this can work without showing the file name or an equivalent substitute (like the package name) in the group. Does the file name go in each item's summaries?
In any case, we're currently discussing xref-show-definitions-function, and not xref-show-xrefs-function.
It's only used for the results of xref-find-definitions, so "who calls" and "who reads" won't be there. Only "who sets/defines".
But one can also think about: select group first, then item within group.
I feel that might be under-utilizing the fuzzy matching capabilities of the existing completion frameworks: it should be usually quicker to match on both in one step.
OTOH, we should create a shortcut for the case when every group contains only one element: then completion would only show the group names (meaning file/package names), without summaries. That might work well in certain environments (like Java?).
[Prev in Thread] | Current Thread | [Next in Thread] |