Finding the best auto completion sorting

Виталий Фадеев vital.fadeev at gmail.com
Sat Apr 17 03:31:54 UTC 2021


On Monday, 5 April 2021 at 22:50:29 UTC, WebFreak001 wrote:
> Hi all, there have been sorting improvements made in serve-d 
> which will affect how user's auto completion will look like 
> when having broad matches. [(1)]
>
> To get a better starting point how you prefer it I would like 
> to do a survey where everyone sends in their preferred sorting 
> rules.
>
> For this please visit https://completion.webfreak.org/ and 
> submit your preferred sorting for this broad auto complete case.
>
> In reality not all types can even be shown at once, (e.g. both 
> `opBinary` and `init` at the same time would be impossible) but 
> for the general case this is helpful in finding what users 
> expect.
>
> [(1)]: https://github.com/Pure-D/serve-d/pull/127

Idea:
1. Scan existent projects:
- scan dlang sources, phobos
- scan popular packages from dlang site
2. Take line with "import ..." from each .d file
3. Sort by usage count

["std.math"]   = 1000
["std.string"] = 900
["std.stdio"]  = 200

It will best suggestion.

Next Idea:
Scan user projects. Find imports. Sort by counter.

It will bestest for user suggestion.



More information about the Digitalmars-d mailing list