Skip to main content

Module suggest

Module suggest 

Source
Expand description

Nearest-name suggestions for names that did not resolve.

Shared by the LSP’s quick fixes and the deployment validation errors so a misspelling reads the same however the user hit it.

Constants§

MAX_DID_YOU_MEAN 🔒
Maximum number of suggestions returned by did_you_mean.

Functions§

did_you_mean 🔒
Return up to MAX_DID_YOU_MEAN closest names from candidates to needle, sorted by Damerau-Levenshtein distance ascending. Names whose distance exceeds max(2, needle.len() / 3) are filtered out so unrelated matches don’t surface as suggestions.