golang/go

x/tools/gopls: Symbols: use Levenshtein distance for ranking

Open

#74793 opened on Jul 29, 2025

View on GitHub
 (8 comments) (2 reactions) (0 assignees)Go (133,883 stars) (19,008 forks)batch import
FeatureRequestToolsgoplshelp wanted

Description

I just sought the symbol testincreemntalnope and got an empty result, even though TestIncrementalNope exists. It's 2025, I shouldn't have to spell correctly. Let's rank candidates by Levenshtein distance from the search term and include the closest n results.

See Starlark's spell.Nearest for an implementation we can use.

Contributor guide