I'm currently thinking about how to efficiently implement autocomplete/intellisense in a language server environment.
The task would be to find all symbols/identifiers (e.g. type names, function, constants, etc.) that match a user-typed string. Both the input and the symbols/identifiers are expected to be quite short but some degree of typos should be tolerated.
What should also be accounted for is that in a development environment the actively developed module changes often and rapidly while e.g. imported libraries remain mostly static.
What kind of data-structure / algorithm is favorable in such an application?
I found some older discussion (1 ,2) that suggests Tries and Ngrams but would be happy about an opinion on this (and if there are other ways to do this in 2024).
发布者:admin,转转请注明出处:http://www.yc00.com/questions/1745630513a4637080.html
评论列表(0条)