Forward preferred_line_length to Dart LSP as dart.lineLength [WIP]#74
Draft
tsinis wants to merge 3 commits intozed-extensions:mainfrom
Draft
Forward preferred_line_length to Dart LSP as dart.lineLength [WIP]#74tsinis wants to merge 3 commits intozed-extensions:mainfrom
tsinis wants to merge 3 commits intozed-extensions:mainfrom
Conversation
- Bump zed_dart version to 0.4.0 in Cargo.toml - Update zed_extension_api to use git source and version 0.8.0 - Adjust version in extension.toml to 0.4.0
Forward Zed's preferred_line_length to Dart LSP as dart.lineLength Read preferred_line_length from LanguageSettings and forward it as dart.lineLength via workspace/configuration, so the Dart formatter automatically respects the line length set in Zed settings. Explicit lsp.dart.settings overrides still take precedence. Closes zed-extensions#2
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Blocked by unreleased
zed_extension_apiv0.8.0Related Zed PR
Closes #2
Context
Now that
preferred_line_lengthis exposed in the Extension API'sLanguageSettings(merged in zed-industries/zed#52175), the Dartextension can forward it to the Dart Analysis Server as
dart.lineLengthvia
workspace/configuration.This means users no longer need to manually configure
lsp.dart.settings.lineLength— the Dart formatter will automaticallyrespect the
preferred_line_lengthset in Zed settings.Explicit
lsp.dart.settingsoverrides still take precedence.Changes
zed_extension_apito0.8.0(git dep until crate is published)preferred_line_lengthfromLanguageSettingswith gracefulfallback if unavailable
dart.lineLengthin workspace configuration0.4.0