extension_api: Expose preferred_line_length in LanguageSettings - #52175
Merged
maxdeviant merged 2 commits intoMar 24, 2026
Merged
Conversation
zed-codeowner-coordinator
Bot
requested review from
a team,
bennetbo and
nathansobo
and removed request for
a team
March 23, 2026 08:44
Contributor
|
maxdeviant
reviewed
Mar 24, 2026
This change removes the `preferred_line_length` field from the `LanguageSettings` struct across multiple versions to streamline settings management.
1 task
5 tasks
piper-of-dawn
pushed a commit
to piper-of-dawn/zed
that referenced
this pull request
Apr 25, 2026
…industries#52175) Closes zed-industries#21822 ## Context Exposes `preferred_line_length` from `AllLanguageSettings` to the Extension API's `LanguageSettings` struct. Currently only `tab_size` is available to extensions, which prevents language extensions (e.g. Dart) from reading the user's preferred line length and forwarding it to their language server (e.g. as `dart.lineLength`). Related: zed-extensions/dart#2 ## How to Review Small change — follow how `tab_size` is plumbed through: 1. WIT definition (`language-settings` record) 2. `extension_api` Rust struct 3. Host-side bridge conversion The new field follows the exact same pattern. ## Self-Review Checklist <!-- Check before requesting review: --> - [x] I've reviewed my own diff for quality, security, and reliability - [ ] Unsafe blocks (if any) have justifying comments - [x] The content is consistent with the [UI/UX checklist](https://github.com/zed-industries/zed/blob/main/CONTRIBUTING.md#uiux-checklist) - [x] Tests cover the new/changed behavior - Compile-time verified via WIT bindings; no runtime behavior change - [x] Performance impact has been considered and is acceptable Release Notes: - N/A
Zenor27
pushed a commit
to Zenor27/zed
that referenced
this pull request
Jul 4, 2026
…industries#52175) Closes zed-industries#21822 ## Context Exposes `preferred_line_length` from `AllLanguageSettings` to the Extension API's `LanguageSettings` struct. Currently only `tab_size` is available to extensions, which prevents language extensions (e.g. Dart) from reading the user's preferred line length and forwarding it to their language server (e.g. as `dart.lineLength`). Related: zed-extensions/dart#2 ## How to Review Small change — follow how `tab_size` is plumbed through: 1. WIT definition (`language-settings` record) 2. `extension_api` Rust struct 3. Host-side bridge conversion The new field follows the exact same pattern. ## Self-Review Checklist <!-- Check before requesting review: --> - [x] I've reviewed my own diff for quality, security, and reliability - [ ] Unsafe blocks (if any) have justifying comments - [x] The content is consistent with the [UI/UX checklist](https://github.com/zed-industries/zed/blob/main/CONTRIBUTING.md#uiux-checklist) - [x] Tests cover the new/changed behavior - Compile-time verified via WIT bindings; no runtime behavior change - [x] Performance impact has been considered and is acceptable Release Notes: - N/A
pixel365
pushed a commit
to pixel365/zed
that referenced
this pull request
Jul 10, 2026
…2560) Closes zed-industries#21822 The issue is closed already, but it was requested to provide the `hard_tabs` boolean param. Follow-up to zed-industries#52175 Reviewed by @maxdeviant (it already bumped the settings path to v0.8.0, so this `hard_tabs` change only needs 2 files, 2-3 lines of code additions). ## Context Exposes `hard_tabs` from `AllLanguageSettings` to the Extension API's `LanguageSettings` struct. Currently, only `tab_size` and `preferred_line_length` are available to extensions, which prevents language extensions (e.g., Go, C++) from reading the user's hard tabs preference and forwarding it to their language server or formatter (e.g., as rustfmt.hard_tabs or clang-format.UseTab). Related: zed-industries#21822 (comment) ## How to Review Small change — follow how `tab_size` is plumbed through: 1. WIT definition (`language-settings` record) 2. `extension_api` Rust struct 3. Host-side bridge conversion The new field follows the exact same pattern. ## Self-Review Checklist <!-- Check before requesting review: --> - [x] I've reviewed my own diff for quality, security, and reliability - [ ] Unsafe blocks (if any) have justifying comments - [x] The content is consistent with the [UI/UX checklist](https://github.com/zed-industries/zed/blob/main/CONTRIBUTING.md#uiux-checklist) - [x] Tests cover the new/changed behavior - Compile-time verified via WIT bindings; no runtime behavior change - [x] Performance impact has been considered and is acceptable Release Notes: - N/A
jonx
pushed a commit
to jonx/zed-aros
that referenced
this pull request
Jul 17, 2026
…industries#52175) Closes zed-industries#21822 ## Context Exposes `preferred_line_length` from `AllLanguageSettings` to the Extension API's `LanguageSettings` struct. Currently only `tab_size` is available to extensions, which prevents language extensions (e.g. Dart) from reading the user's preferred line length and forwarding it to their language server (e.g. as `dart.lineLength`). Related: zed-extensions/dart#2 ## How to Review Small change — follow how `tab_size` is plumbed through: 1. WIT definition (`language-settings` record) 2. `extension_api` Rust struct 3. Host-side bridge conversion The new field follows the exact same pattern. ## Self-Review Checklist <!-- Check before requesting review: --> - [x] I've reviewed my own diff for quality, security, and reliability - [ ] Unsafe blocks (if any) have justifying comments - [x] The content is consistent with the [UI/UX checklist](https://github.com/zed-industries/zed/blob/main/CONTRIBUTING.md#uiux-checklist) - [x] Tests cover the new/changed behavior - Compile-time verified via WIT bindings; no runtime behavior change - [x] Performance impact has been considered and is acceptable Release Notes: - N/A
jolutz
pushed a commit
to jolutz/zed
that referenced
this pull request
Aug 8, 2026
…2560) Closes zed-industries#21822 The issue is closed already, but it was requested to provide the `hard_tabs` boolean param. Follow-up to zed-industries#52175 Reviewed by @maxdeviant (it already bumped the settings path to v0.8.0, so this `hard_tabs` change only needs 2 files, 2-3 lines of code additions). ## Context Exposes `hard_tabs` from `AllLanguageSettings` to the Extension API's `LanguageSettings` struct. Currently, only `tab_size` and `preferred_line_length` are available to extensions, which prevents language extensions (e.g., Go, C++) from reading the user's hard tabs preference and forwarding it to their language server or formatter (e.g., as rustfmt.hard_tabs or clang-format.UseTab). Related: zed-industries#21822 (comment) ## How to Review Small change — follow how `tab_size` is plumbed through: 1. WIT definition (`language-settings` record) 2. `extension_api` Rust struct 3. Host-side bridge conversion The new field follows the exact same pattern. ## Self-Review Checklist <!-- Check before requesting review: --> - [x] I've reviewed my own diff for quality, security, and reliability - [ ] Unsafe blocks (if any) have justifying comments - [x] The content is consistent with the [UI/UX checklist](https://github.com/zed-industries/zed/blob/main/CONTRIBUTING.md#uiux-checklist) - [x] Tests cover the new/changed behavior - Compile-time verified via WIT bindings; no runtime behavior change - [x] Performance impact has been considered and is acceptable Release Notes: - N/A
playdohface
pushed a commit
to playdohface/zed
that referenced
this pull request
Aug 29, 2026
…2560) Closes zed-industries#21822 The issue is closed already, but it was requested to provide the `hard_tabs` boolean param. Follow-up to zed-industries#52175 Reviewed by @maxdeviant (it already bumped the settings path to v0.8.0, so this `hard_tabs` change only needs 2 files, 2-3 lines of code additions). ## Context Exposes `hard_tabs` from `AllLanguageSettings` to the Extension API's `LanguageSettings` struct. Currently, only `tab_size` and `preferred_line_length` are available to extensions, which prevents language extensions (e.g., Go, C++) from reading the user's hard tabs preference and forwarding it to their language server or formatter (e.g., as rustfmt.hard_tabs or clang-format.UseTab). Related: zed-industries#21822 (comment) ## How to Review Small change — follow how `tab_size` is plumbed through: 1. WIT definition (`language-settings` record) 2. `extension_api` Rust struct 3. Host-side bridge conversion The new field follows the exact same pattern. ## Self-Review Checklist <!-- Check before requesting review: --> - [x] I've reviewed my own diff for quality, security, and reliability - [ ] Unsafe blocks (if any) have justifying comments - [x] The content is consistent with the [UI/UX checklist](https://github.com/zed-industries/zed/blob/main/CONTRIBUTING.md#uiux-checklist) - [x] Tests cover the new/changed behavior - Compile-time verified via WIT bindings; no runtime behavior change - [x] Performance impact has been considered and is acceptable Release Notes: - N/A
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.
Closes #21822
Context
Exposes
preferred_line_lengthfromAllLanguageSettingsto the ExtensionAPI's
LanguageSettingsstruct. Currently onlytab_sizeis available toextensions, which prevents language extensions (e.g. Dart) from reading the
user's preferred line length and forwarding it to their language server
(e.g. as
dart.lineLength).Related: zed-extensions/dart#2
How to Review
Small change — follow how
tab_sizeis plumbed through:language-settingsrecord)extension_apiRust structThe new field follows the exact same pattern.
Self-Review Checklist
Release Notes: