problem in flutter widgets not generating fully in vscode - flutter

whenever to generate and select widgets for example Text widget it comes incomplete like "Text" instead of "Text()". i have tried to uninstall and reinstall Vscode but it is still doing the same. i am using vscode 1.52.1

It sounds like you're probably using the LSP Preview which didn't have this functionality until recently. If you're using a recent dev build, you should be able to get it back by enabling the dart.completeFunctionCalls setting.
#2823: A new setting dart.completeFunctionCalls will cause code completion on functions/methods to include parentheses and argument placeholders for required arguments.

Related

Android Studio - multi-line additionalArgs?

I'm trying to build a Flutter app in Android Studio. We're using VSCode with quite many dart-define's in .vscode\launch.json. In Android Studio, I think, we should use Build Configuration - Additional run args.
The problem with it, however, is that it's a single line edit and it's too cumbersome to manage the many defines that in VSCode are easily accessible via regular text editor
Is there a better way to do this? Like, reference an external file and load the defines from there?
The IDE saves the entire string as an xml attribute in workspace.iml, so I can't just edit that as well.
In that window, you will see a small expansion array on the far end of the textbox. You should click it to get a multi - line sort of view for the args

visual studio code surround with extention can not find surround.custom snippets

The first time I use surround with after starting vs code, I can find the surround.custom scripts that I created, as indicated in the next image
After I use one of those custom surround with scripts successful, If I try to use again one of those custom surround with scripts, vs code does not display them anymore.
To fix that, I restart vscode. So I have to restart vscode multiple times to use custom surround scripts multiple times.
That issue started a few months ago, before that I was able to use custom scripts multiple times without any issue.
I am using vscode version 1.59.0 and SURROUND extension version 1.2.2. I tried earlier versions, and faced the same issue.
Any suggestion on a fix for that issue?
Apparently, that is fixed if the following checkbox is unchecked
alternatively, settings.json file could be modified manually. The following element should be added
"surround.showRecentlyUsedFirst": false

vscode invalid syntax error for dart and flutter after pressing the Ctrl+Shift+I short to format the code in readable form

I am using vscode in ubuntu for developing flutter application. I installed the flutter and dart extension for vscode. when I write code and keep it the same dirty format it doesn't take any syntax error -although it shouldn't- but after I reformat the code in a readable shape using Ctrl+Shift+i short-key vscode takes syntax error. However, when I close the file (here the .dart file) and re-open it, all errors is gone. You can see it more in the picture.
I don't know how to handle this kinda error.
I would guess you have the Laravel Blade Spacer extension installed. This extension accidentally reverses the order of edits when handling a document edit event. VS Code then passes that mutated set of changes to other extensions (like Dart) which end up making incorrect edits (in this case, that are sent to the language server, so it gets an incorrect picture of what the file looks like).
This was fixed in VS Code (by preventing mutations to the array) in https://github.com/microsoft/vscode/issues/88310, but has yet to be released.
For now, you'll need to either disable that extension or use VS Code Insiders. Once the next stable version of VS Code is out, the issue should disappear.

Is it possible to alter the layout of a terminal in a VSC extension

I would like to add a button next to the terminal dropdown but can't see a way in the API to do this
From the docs:
[...] However, we also impose restrictions upon extensions to ensure the stability and performance of VS Code. For example, extensions cannot access the DOM of VS Code UI.
Therefore I think it is not possible to add a button next to the terminal.

VS Code cursor jumping to bottom

Why does my cursor jump to the last line of code when I create new tags? For example, when I type a comment in HTML, as soon as I type the !, it jumps to the bottom. What setting do I have to change to prevent this from happening? It is very annoying. I am just starting to use VS Code so sorry if this is a really simple fix.
I had a similar issue. The Flow Language Support extension was causing it. I disabled it, and then the issue was gone.
I had the same issue when I first started using vscode.
Explanation
Generally, the issue is caused by an extension of some sort that is messing with your IDE. Like the extension is trying to do its job but either there is a conflict with other extensions or vscode settings or that's how it works.
More specifically, I found the issue was caused by the the HTML, CSS, JS formatter extension.
Solution
If you have that extension, try disabling it and restart vscode. if the issue is fixed then you may leave it disabled or uninstall it. If it is not solved repeat the process with other extensions, especially those that format your code, until you find the culprit and remove it.
Also i got this type of issue.The solution is just disable your auto save it will work.
If you're an Angular developer, maybe consider disabling Angular Essentials Extension by "John Papa". Then restart VS Code.
That worked for me after several frustrations.