Reputation: 416
I have coded in Java with IntelliJ and found that the code completion works perfectly. But when I tried to code in a new language (Dart), the auto-completion does not work as expected.
When I type a string of characters (e.g. "String"), the code completion pops up with incorrect suggestions initially, then refreshes to show a larger list of suggestions containing the desired completion.
Initially:
After a few hundred milliseconds:
It takes a while for the full list of suggestions to appear. In the first photo, there is a spinning loading icon in the bottom right. I assume that IntelliJ is providing me with an incomplete list of suggestions before fully loading all the suggestions. But if I hit [ENTER] or type [SPACE] immediately after typing "String", I get the incorrect "EquatableConfig.stringify" autocomplete, whereas I just want a String.
Is there a way to fix this?
Upvotes: 1
Views: 1813
Reputation: 1851
This may happen while analysis is in progress. For example, soon after project opening or after a major source or pubspec modification. Some completion variants appear sooner than others, and this causes confusion. Once the project is warmed up, code completion should include String item right away.
Note that you may disable completion item insertion on Space in Settings (Preferences) | Editor | General | Code Completion.
Upvotes: 2