Autocomplete too agressive
Opened this issue · 2 comments
Prerequisites
- Put an X between the brackets on this line if you have done all of the following:
- Reproduced the problem in Safe Mode: http://flight-manual.atom.io/hacking-atom/sections/debugging/#using-safe-mode
- Followed all applicable steps in the debugging guide: http://flight-manual.atom.io/hacking-atom/sections/debugging/
- Checked the FAQs on the message board for common solutions: https://discuss.atom.io/c/faq
- Checked that your issue isn't already filed: https://github.com/issues?utf8=✓&q=is%3Aissue+user%3Aatom
- Checked that there is not already an Atom package that provides the described functionality: https://atom.io/packages
Description
I find that the autocomplete feature, while being useful most of the time, is way too agressive sometimes and quickly becomes rather annoying.
I'm working on a medium sized project, a couple of thousand lines of code. Somehow, autocomplete seems to find the most ridiculous matches.
For instance:
"good" results in "info_type_group_SelectionChangedFcn"
as a suggestion, which frankly is absolutely ridiculous.
Similar stuff happens all the time, forcing me to manually skip the suggestion as to avoid hitting enter for a new line and involuntarily accepting the silly suggestion. At this point I get more bogus suggestions than actual helpful ones.
I believe the cause for this is that the detection of typos is way to loose. If the deviation is bigger than say 30% of the letters, the program shouldn't match what you type to a preexisting expression.
Steps to Reproduce
- Have a big project with lots of expressions
- type something new
- get autocomplete suggestions which are absolutely nonsense
Expected behavior: Only getting reasonable autocomplete suggestions
Actual behavior: Getting all sorts of unlikely suggestions
Reproduces how often: All the time, you just need a project with lots of words the autocomplete feature can pull from.
Versions
Atom : 1.34.0
Electron: 2.0.16
Chrome : 61.0.3163.100
Node : 8.9.3
Windows 10 1809
autocomplete-atom-api 0.10.7
Additional Information
The code I'm working in is MATLAB language, using the language-matlab package (0.2.1).
Couldn't test with a different language since I don't have a similarily sized project in a different language on hand, but I expect the same behaviour.
This sounds like suggestions from the built-in provider (which provides suggestions from open files) - you can turn off this fuzzy matching by enabling Settings > Packages > Autocomplete Plus > Use Strict Matching For Built-In Provider
. good
would no longer match info_type_group_SelectionChangedFcn
with this setting enabled (but typing info
would).
Going to go ahead and close but let me know if I'm misunderstanding anything.
That was what I was looking for, thanks a lot!