zed
zed copied to clipboard
Dart Autoformatting Issue with Semicolons in Code `;`
Check for existing issues
- [X] Completed
Describe the feature
Dart formatting is encountering an unexpected behavior where adding a semicolon;
at the end of a line of code triggers an automatic reformatting of the entire code block.
This issue disrupts the intended formatting and layout, leading to inconsistencies and potential errors in the code.
It's also important to note that we have already attempted to disable autoformatting in the editor, but the problem persists.
If applicable, add mockups / screenshots to help present your vision of the feature
I guess this behavior is triggered by "On Type Formatting" of the Dart LSP.
Try adding the following setting to deactivate this:
{
"use_on_type_format": false
}
PS: to avoid this more generally in Dart / Flutter, try using trailing commas
I guess this behavior is triggered by "On Type Formatting" of the Dart LSP.
Try adding the following setting to deactivate this:
{ "use_on_type_format": false }
PS: to avoid this more generally in Dart / Flutter, try using trailing commas
Thankyou @flo80 it work nice now