settings: Extract project settings JSON schema#47939
Merged
Conversation
Introduces a separate JSON schema for project settings that excludes user-only settings like `auto_update`, `telemetry`, `vim_mode`, etc. This provides more accurate autocomplete and validation when editing the project-specific settings file, `.zed/settings.json`. - Add `SettingsStore::project_json_schema` - Map `.zed/settings.json` to `zed://schemas/project_settings` schema URL
Extract `SettingsStore::configure_schema_generator` helper to reduce duplication between `SettingsStore.json_schema` and `SettingsStore.project_json_schema`. Both methods now share the common logic for language and LSP settings schema replacements.
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.
Currently, the same JSON schema is used for both user settings,
~/.config/zed/settings.json, and project settings,.zed/settings.json, which can lead to confusion as not every setting is supported at the project level and will override the user-defined ones, for example,auto_update,telemetry, etc.These changes add a project-specific JSON schema to be used when dealing with a project settings file,
.zed/settings.json, so the JSON language server only suggests settings that are valid at the project level.Release Notes:
.zed/settings.json) to only include settings that are valid at the project level, excluding user-only settings.