From bac6896786b5ef52619389bb0483a5cdbf288a44 Mon Sep 17 00:00:00 2001 From: Peter Tripp Date: Tue, 10 Dec 2024 16:22:17 +0000 Subject: [PATCH] Add Dart docs for line length (#21815) --- docs/src/languages/dart.md | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/docs/src/languages/dart.md b/docs/src/languages/dart.md index 6b7d01c39ea698ecf3f470d1ad2525569d95bbb1..9d008c4c2c3530af4bed7626c0e8cb1c7b400ec1 100644 --- a/docs/src/languages/dart.md +++ b/docs/src/languages/dart.md @@ -35,4 +35,20 @@ If you would like to use a specific dart binary or use dart via FVM you can spec } ``` +### Formatting + +Dart by-default uses a very conservative maximum line length (80). If you would like the dart LSP to permit a longer line length when auto-formatting, add the following to your Zed settings.json: + +```json +{ + "lsp": { + "dart": { + "settings": { + "lineLength": 140 + } + } + } +} +``` + Please see the Dart documentation for more information on [dart language-server capabilities](https://github.com/dart-lang/sdk/blob/main/pkg/analysis_server/tool/lsp_spec/README.md).