Finding the best auto completion sorting
Jacob Carlborg
doob at me.com
Fri Apr 9 18:49:59 UTC 2021
On 2021-04-06 08:36, WebFreak001 wrote:
> that would certainly be nice but until they open it up to third party
> developers it's impossible to actually add that using their extension.
> You would need to roll your own and I think a simple list of commonly
> used things in a given context would work just as well. (also sourced
> from projects on GitHub)
There's still a lot of room for improvements without having to use AI to
sort the list. For example, make it aware of the context:
long foo = bar.
If auto completion is triggered at the dot, it should prefer those
methods/fields that return `long`, then `int` and so on.
There could also be some common cases that are hardcoded based on the
surrounding context. For example:
int[] arr;
if (arr.
If auto completion is triggered at the dot, it should probably prefer
the `empty` function and then the `length` property.
But these features would probably require more semantic analysis than
DCD is capable of.
--
/Jacob Carlborg
More information about the Digitalmars-d
mailing list