admin管理员组

文章数量:1434949

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).

本文标签: algorithmEfficient autocomplete for a language serverStack Overflow