I'm trying to change the line length for Code wrapping in VSCode I've tried a lot of solutions here in Stackoverflow but it didn't work out for me, something weird. This is an image of a dart code shows the code wrapped if it exceeded that column:
CodePudding user response:
You can try to add these (adjust the numbers yourself) in your settings.json:
{
"editor.wordWrap": "wordWrapColumn",
"editor.wordWrapColumn": 120,
"editor.rulers": [120]
}
CodePudding user response:
It took me long to find but finally here in Stackoverflow. changing only editor.wordwrap in settings.json won't do it for Dart code/formatter, these setting I think is for general Vscode but should be added also:
{
"editor.wordWrap": "wordWrapColumn",
"editor.wordWrapColumn": 120,
"editor.rulers": [120]
}
As for it to work for "Dart" code, these settings should be added:
"dart.lineLength": 120,
"[dart]": {
"editor.rulers": [
120
],
}
Thanks for all who answered in that question: Changing wordwrapping and formatting for Dart code in VSCode