atom/autocomplete-plus

Autocomplete too agressive

Opened this issue · 2 comments

Prerequisites

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

  1. Have a big project with lots of expressions
  2. type something new
  3. 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.

rsese commented

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!