StefanoV827
StefanoV827

Reputation: 309

VSCODE + Dart/Flutter: Double Autocomplete in conflict

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.

Autocomplete working: enter image description here

Strange auto-selection and then no-autocomplete:

enter image description here

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.

enter image description here

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

Answers (2)

MarBer
MarBer

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

StefanoV827
StefanoV827

Reputation: 309

Fixed!

In setting i had to disable LSP.

"dart.previewLsp": false

Upvotes: 9

Related Questions