Reputation: 309
i use visual studio code to create my flutter app, but since 1 month ago, i detected as if the editor have a double autocomplete.
When i write for example: "Container" i have the autocomplete while i'm writing, but if i press Enter it won't add the brackets at the end (before, it did!) And, if i write: "child" i have the autocomplete while i'm writing, but if i press Enter, the cursor will be with a selection, and there is no autocomplete until i click in somewhere to remove the auto-selection, or i write the command completely without autocomplete.
It's like if there were a double autocomplete in conflict, that select the words after i press enter.
Strange auto-selection and then no-autocomplete:
Furthermore, if i write "setState" and press Enter to autocomplete the function, i get the whole function selected and tabbed of 4 tabulation on the right. Same for initState.
I tried to disable every extension and restart, but i had same problem.
I'm so slow now to write flutter code, because i have to remember every CamelCase word and property and write them in every single char, or click in somewhere to make autocomplete works.
Upvotes: 1
Views: 2014
Reputation: 595
I've the same issue, after some research I found this: https://github.com/Dart-Code/Dart-Code/issues/2823#issuecomment-725630953 I'm not sure this is the right way because I didn't have try yet but the problem on GitHub issues seams the same you describe, apparently this solution works with LSP enabled
Upvotes: 2
Reputation: 309
Fixed!
In setting i had to disable LSP.
"dart.previewLsp": false
Upvotes: 9