Android Studio, how to optimize Code Completion behaviour: How can you get from Code Completion the class constructor as first suggestion, not as 2nd
Hello, When you type, how can you get from code completion the class constructor as first suggestion, not as second or 7th one?
Im optimizing my work flow, specifically i'm working with flutter in android studio, and a very basic but commun thing that happens is: you write
MaterialApp(home: Scaf
Auto Completion suggests these options: (see image)
The first suggestion that Code Completion gives you, is this:
Scaffold
, the class name. the one with a teal color circle with a C see image:
But 7th suggestion is much better, the option with a orange circle in the left, this one autocompletes to
Scaffold()
, the class constructor. Adding
those () tons of times, saves you ton of time see image:
First improvement, if you change autocomplete to sort by name, now you get what you want in 2nd place, much better, but still improvable see image:
Ok, the thing is, the option i don't want, the option that gives you Scaffold
and does not give you Scaffold()
, the option that in auto completion appears with a teal color circle with a C. I do not want those auto completions ever, i want only the good ones appears, the ones with the orange circle, the ones that gives you Scaffold() or Text() or AppBar() Is there a way to modify auto completion in order to only gives you the orange circle ones, the constructor class ones? Or that gives them in first places? look the images for fast visualization Thanks!!
2nd improvement is to customize it with LIve Templates, but a general solution would be much better. By the way, great interface in this forum, congrats to the team who built it.
Please sign in to leave a comment.
Unfortunately it's not something that is controlled by the Dart plugin. Code completion, highlighting, quick fixes and other code insight features are powered by the Dart Analysis Server, a tool from the Dart SDK. IDE only shows what server asks it to show. For the reference, issues specific to the Dart Analysis Server are tracked in https://github.com/dart-lang/sdk/issues. Please feel free to submit a ticket there
Hello Elena, and thanks for so fast answering. Ok, good, i continue researching the topic knowing now the order origin comes from Dart SDK. Have a good day.