-
Notifications
You must be signed in to change notification settings - Fork 12.8k
Suggestions for misspelled properties and variables (based on Levenshtein distance for variables/properties in scope) #15333
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
@sandersn notes from backlog slog:
|
You can track the progress of this at the branch There's a quick fix for property accesses. My next step is to make it work for standalone identifiers as well. |
Should intellisense also suggest something when you misspell? |
Are you saying that it should provide spelling corrections when the list would otherwise be empty? For example, when the very first letter is misspelled? I think that could work, but I'd have to play around with it to know for sure. |
@sandersn yes, exactly |
Consider the following code:
Currently compilation fails with the message:
In case when a variable is misspelled, the error is even less helpful:
It could offer variable/property suggestion, like:
For example, Rust compiler (1.16) would suggest an existing variable that most resembles the misspelled one, based on Levenstein distance, if I'm correct.
The text was updated successfully, but these errors were encountered: