Open cmroanirgo opened 8 years ago
+1 can confirm.
What you're seeing are suggestions provided by Atom's own autocomplete-snippets, which does not attempt to read the autocomplete-plus.minimumWordLength
setting.
Once you get to three characters or more, you'll get the snippet suggestions /and/ the symbol-provider suggestions, since symbol-provider respects that setting.
I can confirm that if you disable the snippet provider package, this behavior will go away. At least for js. You'd have to also disable the css provider to not have this behavior in css, or the html provider to not have it in html, and so forth. All of these (autocomplete-snippets, autocomplete-css, autocomplete-html, autocomplete-emojis, autocomplete-atom-api) are built-in Atom-authored packages.
It's not really autocomplete-snippets's fault, though. The design decision to force providers to read a config setting that doesn't belong to them is strange.
For reference, of the autocomplete providers listed in this package's documentation.....
atom-youcompleteme autocomplete-underdash atom-ide-flow atom-ctags autocomplete-paths autocomplete-snippets autocomplete-emojis mavensmate-atom atom-typescript atom-racer autocomplete-kdb-q language-pig autocomplete-nunjucks atom-autocomplete-marko atom-autocomplete-haxe ide-haskell autocomplete-hack autocomplete-glsl autocomplete-erlang autocomplete-elixir dartlang dart-tools autocomplete-computercraft omnisharp-atom atom-autocomplete-asciidoc atom-autocomplete-xml autocomplete-python autocomplete-php atom-autocomplete-php php-integrator autocomplete-java-minus atom-ternjs autocomplete-html autocomplete-go go-plus autocomplete-bibtex autocomplete-css autocomplete-atom-api
.....do not use autocomplete-plus.minimumWordLength
, while just
symbol
fuzzy[deprecated] autocomplete-clang autocomplete-haskell
do use it.
That's 1/6 first-party providers1 that are compliant, and only 2/33 from third parties.
Note of course that this package could trivially enforce minimumWordLength
by not requesting suggestions until the length requirement is met (or a manual activation), which is not the current behavior.
1 Just symbol -- deprecated fuzzy doesn't really count. The noncompliant five are atom/autocomplete-css, atom/autocomplete-html, atom/autocomplete-snippets, atom/autocomplete-emojis, atom/autocomplete-atom-api.↩
That one is really annoying. Are there any solutions or workarounds available?
I could see it making sense to do as @tofof suggested and only request suggestions from providers when the minimum word length is met. One edge case, that isn't so edgy, is that some providers wish to provide suggestions on non-word characters like .
. This is the case for the atom-ide language providers for instance.
I ran into this same problem - thanks all for the explanation! That said, one thing still baffles me: when I disable autocomplete-plus, with autocomplete-snippet still enabled, the single-character suggestions go away. (That's why I assumed this had to be an autocomplete-plus issue.) It works in reverse, too - I only get suggestions after one character if BOTH autocomplete-plus AND autocomplete-snippet are enabled. Does anyone know why this is the case?
(If this is well covered, pls forgive me , I'm a n00b to atom... but this existing functionality is a complete deal breaker in using atom as an editor)
The setting 'Minimum Word Length' seems to be ignored:
I tried changing it to a higher value (eg 4) but still, it shows. I have not changed any other settings in the app at all (other than select a light theme ;) ). I have spent all of my 30mins testing atom in trying to stop this current functionality. Given the setting, I would expect the suggestion list to only appear after 4 characters have been typed in.