I'm using Visual Studio Code for flutter programming and not using many extensions. I loved the code completion but it's usually too slow. It takes around 1-2 seconds for showing all suggestions. Is there any solution to this problem? Here is my list of installed extensions:
I was told to add this config:
"dart.previewLsp": true,
which would put the plug-in into speaking the Language Server Protocol rather than a proprietary protocol, and it seems to have sped things up.
dart.useLsp
now. If you wish to follow this answer then you should add "dart.useLsp": true,
but that didn't solve it for me. In fact, I disabled the LSP and it's now much faster. Just a heads up –
Dye Update on 14.09.2022
dart.useLsp
key is no longer valid: v3.48 release notes
Use this instead:
"dart.useLegacyAnalyzerProtocol": true
Accepted answer and resetting the recommended language settings haven't worked out for me.
Although, I've continued to research a bit more and the LSP part seemed promising simply because it popped out in a bunch of unrelated sources too. But instead of enabling LSP to speed things up, people suggest going in the opposite direction and disabling LSP. Specifically, a person from the Dart VSCode team (at GitHub):
…The only other thing I could suggest is disabling LSP but also disabling auto-import completions…
Said settings can be set from settings.json
like below:
"dart.useLsp": false,
"dart.autoImportCompletions": false
Using "Recommended Settings" worked for me.
Steps: Cntrl + Shift + P
> Type and select "Use Recommended Settings".
This overwrites the recommended settings for Dart.
© 2022 - 2024 — McMap. All rights reserved.