How to stop formatter wrapping at 80 characters?
See original GitHub issueVSCode Version 1.33.1 (1.33.1) Dart 3.02
Whenever code formatting is invoked, it wraps my dart code even though I checked all settings I could find I don’t think it’s a general VSCode issue because the same code in an .m file does not get wrapped.
{
"dart.flutterSdkPath": "/Applications/flutter",
"workbench.colorTheme": "Visual Studio Light",
"editor.formatOnSave": true,
"editor.minimap.enabled": false,
"editor.codeLens": false,
"editor.folding": false,
"editor.highlightActiveIndentGuide": false,
"editor.insertSpaces": false,
"editor.lightbulb.enabled": true,
"editor.renderIndentGuides": false,
"editor.overviewRulerBorder": true,
"editor.hideCursorInOverviewRuler": true,
"editor.wordWrapColumn": 999,
"editor.formatOnType": true,
"editor.wrappingIndent": "none",
"[dart]": {
"editor.rulers": [
0
]
},
}
final existingEvents = (await deviceCalendar.retrieveEvents(calendar.id, RetrieveEventsParams())).data;
final newEvents = list.where((x)=>existingEvents.firstWhere((y)=>y.title == x['text']) == null);
Becomes
final existingEvents = (await deviceCalendar.retrieveEvents(
calendar.id, RetrieveEventsParams()))
.data;
final newEvents = list.where((x) =>
existingEvents.firstWhere((y) => y.title == x['text']) == null);
Issue Analytics
- State:
- Created 4 years ago
- Reactions:4
- Comments:17 (6 by maintainers)
Top Results From Across the Web
python - Disable auto wrap long line in Visual Studio Code
If you use autopep8 , do the following: open "Settings"-> search "python formatting autopep8 args" -> click "Add Item" -> type --max-line-length ......
Read more >VS Code tips — Editor word wrap - YouTube
The "Editor: Word Wrap " setting in VS Code controls the soft wrapping of long lines in the editor:- 'off' — Disable wrapping...
Read more >Wrap Existing Text at 80 Characters in Vim - Thoughtbot
You have an existing block of text or code in vim. You want to re-format it to wrap to 80-characters. :set textwidth=80.
Read more >The Black code style - Black 22.12.0 documentation
How Black wraps lines#. Black ignores previous formatting and applies uniform horizontal and vertical whitespace to your code. The rules for horizontal ...
Read more >Word wrap - Visual Studio (Windows) - Microsoft Learn
You can set and clear the Word wrap option. When this option is set, the portion of a long line that extends beyond...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
You’re right, this is a Dart setting. For formatting, we use the SDK-supplied dart_style library which wraps lines at 80 characters, but you can control this with the
"dart.lineLength"
setting.Let me know if this doesn’t work for you.
Wish this setting could be shared with teammates.
We use
editorconfig
, however the line length defined in screenshot above overrides property in.editorconfig
file.Have tried such config:
or
None is functional.
Is there anything to do to make editorconfig configuration take precedence over dart editor setting ? Any alternative way to share this setting ?
Thanks 😉