docs: Validate JSON snippets (settings, keymap, tasks, etc) (#40043)

Closes #ISSUE

Release Notes:

- N/A *or* Added/Fixed/Improved ...
This commit is contained in:
Ben Kunkle
2025-10-12 00:19:57 -04:00
committed by GitHub
parent deef58bef7
commit abe1fd5e16
74 changed files with 849 additions and 640 deletions
+14 -14
View File
@@ -8,7 +8,7 @@ Learn about all the settings you can customize in Zed's Agent Panel.
If you're using [Zed's hosted LLM service](./subscription.md), it sets `claude-sonnet-4` as the default model for agentic work (agent panel, inline assistant) and `gpt-5-nano` as the default "fast" model (thread summarization, git commit messages). If you're not subscribed or want to change these defaults, you can manually edit the `default_model` object in your settings:
```json
```json [settings]
{
"agent": {
"default_model": {
@@ -27,7 +27,7 @@ You can assign distinct and specific models for the following AI-powered feature
- Inline assistant model: Used for the inline assistant feature
- Commit message model: Used for generating Git commit messages
```json
```json [settings]
{
"agent": {
"default_model": {
@@ -64,7 +64,7 @@ The models you specify here are always used in _addition_ to your [default model
For example, the following configuration will generate two outputs for every assist.
One with Claude Sonnet 4 (the default model), and one with GPT-5-mini.
```json
```json [settings]
{
"agent": {
"default_model": {
@@ -85,7 +85,7 @@ One with Claude Sonnet 4 (the default model), and one with GPT-5-mini.
Specify a custom temperature for a provider and/or model:
```json
```json [settings]
"model_parameters": [
// To set parameters for all requests to OpenAI models:
{
@@ -114,7 +114,7 @@ Note that some of these settings are also surfaced in the Agent Panel's settings
Use the `default_view` setting to change the default view of the Agent Panel.
You can choose between `thread` (the default) and `text_thread`:
```json
```json [settings]
{
"agent": {
"default_view": "text_thread"
@@ -126,7 +126,7 @@ You can choose between `thread` (the default) and `text_thread`:
Use the `agent_font_size` setting to change the font size of rendered agent responses in the panel.
```json
```json [settings]
{
"agent": {
"agent_font_size": 18
@@ -141,7 +141,7 @@ Use the `agent_font_size` setting to change the font size of rendered agent resp
Control whether to allow the agent to run commands without asking you for permission.
The default value is `false`.
```json
```json [settings]
{
"agent": {
"always_allow_tool_actions": true
@@ -154,7 +154,7 @@ The default value is `false`.
Control whether to display review actions (accept & reject) in single buffers after the agent is done performing edits.
The default value is `false`.
```json
```json [settings]
{
"agent": {
"single_file_review": true
@@ -169,7 +169,7 @@ When set to false, these controls are only available in the multibuffer review t
Control whether to hear a notification sound when the agent is done generating changes or needs your input.
The default value is `false`.
```json
```json [settings]
{
"agent": {
"play_sound_when_agent_done": true
@@ -182,7 +182,7 @@ The default value is `false`.
Use the `message_editor_min_lines` setting to control minimum number of lines of height the agent message editor should have.
It is set to `4` by default, and the max number of lines is always double of the minimum.
```json
```json [settings]
{
"agent": {
"message_editor_min_lines": 4
@@ -196,7 +196,7 @@ Make a modifier (`cmd` on macOS, `ctrl` on Linux) required to send messages.
This is encouraged for more thoughtful prompt crafting.
The default value is `false`.
```json
```json [settings]
{
"agent": {
"use_modifier_to_send": true
@@ -209,7 +209,7 @@ The default value is `false`.
Use the `expand_edit_card` setting to control whether edit cards show the full diff in the Agent Panel.
It is set to `true` by default, but if set to false, the card's height is capped to a certain number of lines, requiring a click to be expanded.
```json
```json [settings]
{
"agent": {
"expand_edit_card": false
@@ -222,7 +222,7 @@ It is set to `true` by default, but if set to false, the card's height is capped
Use the `expand_terminal_card` setting to control whether terminal cards show the command output in the Agent Panel.
It is set to `true` by default, but if set to false, the card will be fully collapsed even while the command is running, requiring a click to be expanded.
```json
```json [settings]
{
"agent": {
"expand_terminal_card": false
@@ -235,7 +235,7 @@ It is set to `true` by default, but if set to false, the card will be fully coll
Control whether to display the thumbs up/down buttons at the bottom of each agent response, allowing to give Zed feedback about the agent's performance.
The default value is `true`.
```json
```json [settings]
{
"agent": {
"enable_feedback": false
+2 -2
View File
@@ -63,7 +63,7 @@ Zed will intentionally exclude certain files from Predictive Edits entirely, eve
You can inspect this exclusion list by opening `zed: open default settings` from the command palette:
```json
```json [settings]
{
"edit_predictions": {
// A list of globs representing files that edit predictions should be disabled for.
@@ -83,7 +83,7 @@ You can inspect this exclusion list by opening `zed: open default settings` from
Users may explicitly exclude additional paths and/or file extensions by adding them to [`edit_predictions.disabled_globs`](https://zed.dev/docs/configuring-zed#edit-predictions) in their Zed settings.json:
```json
```json [settings]
{
"edit_predictions": {
"disabled_globs": ["secret_dir/*", "**/*.log"]
+1 -1
View File
@@ -14,7 +14,7 @@ When using AI in Zed, you can configure multiple dimensions:
We want to respect users who want to use Zed without interacting with AI whatsoever.
To do that, add the following key to your `settings.json`:
```json
```json [settings]
{
"disable_ai": true
}
+18 -18
View File
@@ -21,9 +21,9 @@ Zed's Edit Prediction comes with two different display modes:
Toggle between them via the `mode` key:
```json
```json [settings]
"edit_predictions": {
"mode": "eager" | "subtle"
"mode": "eager" // or "subtle"
},
```
@@ -50,7 +50,7 @@ See the [Configuring GitHub Copilot](#github-copilot) and [Configuring Supermave
By default, `tab` is used to accept edit predictions. You can use another keybinding by inserting this in your keymap:
```json
```json [settings]
{
"context": "Editor && edit_prediction",
"bindings": {
@@ -62,7 +62,7 @@ By default, `tab` is used to accept edit predictions. You can use another keybin
When there's a [conflict with the `tab` key](#edit-predictions-conflict), Zed uses a different context to accept keybindings (`edit_prediction_conflict`). If you want to use a different one, you can insert this in your keymap:
```json
```json [settings]
{
"context": "Editor && edit_prediction_conflict",
"bindings": {
@@ -75,7 +75,7 @@ If your keybinding contains a modifier (`ctrl` in the example above), it will al
You can also bind this action to keybind without a modifier. In that case, Zed will use the default modifier (`alt`) to preview the edit prediction.
```json
```json [settings]
{
"context": "Editor && edit_prediction_conflict",
"bindings": {
@@ -88,7 +88,7 @@ You can also bind this action to keybind without a modifier. In that case, Zed w
To maintain the use of the modifier key for accepting predictions when there is a language server completions menu, but allow `tab` to accept predictions regardless of cursor position, you can specify the context further with `showing_completions`:
```json
```json [settings]
{
"context": "Editor && edit_prediction_conflict && !showing_completions",
"bindings": {
@@ -102,7 +102,7 @@ To maintain the use of the modifier key for accepting predictions when there is
The keybinding example below causes `alt-tab` to always be used instead of sometimes using `tab`. You might want this in order to have just one keybinding to use for accepting edit predictions, since the behavior of `tab` varies based on context.
```json
```json [keymap]
{
"context": "Editor && edit_prediction",
"bindings": {
@@ -126,7 +126,7 @@ The keybinding example below causes `alt-tab` to always be used instead of somet
If `"vim_mode": true` is set within `settings.json`, then additional bindings are needed after the above to return `tab` to its original behavior:
```json
```json [keymap]
{
"context": "(VimControl && !menu) || vim_mode == replace || vim_mode == waiting",
"bindings": {
@@ -145,7 +145,7 @@ If `"vim_mode": true` is set within `settings.json`, then additional bindings ar
While `tab` and `alt-tab` are supported on Linux, `alt-l` is displayed instead. If your window manager does not reserve `alt-tab`, and you would prefer to use `tab` and `alt-tab`, include these bindings in `keymap.json`:
```json
```json [keymap]
{
"context": "Editor && edit_prediction",
"bindings": {
@@ -170,7 +170,7 @@ Zed requires at least one keybinding for the {#action editor::AcceptEditPredicti
If you have previously bound the default keybindings to different actions in the global context, you will not be able to preview or accept edit predictions. For example:
```json
```json [keymap]
[
// Your keymap
{
@@ -184,7 +184,7 @@ If you have previously bound the default keybindings to different actions in the
To fix this, you can specify your own keybinding for accepting edit predictions:
```json
```json [keymap]
[
// ...
{
@@ -208,7 +208,7 @@ Alternatively, if you have Zed set as your provider, consider [using Subtle Mode
To not have predictions appear automatically as you type, set this within `settings.json`:
```json
```json [settings]
{
"show_edit_predictions": false
}
@@ -221,7 +221,7 @@ Still, you can trigger edit predictions manually by executing {#action editor::S
To not have predictions appear automatically as you type when working with a specific language, set this within `settings.json`:
```json
```json [settings]
{
"language": {
"python": {
@@ -235,7 +235,7 @@ To not have predictions appear automatically as you type when working with a spe
To disable edit predictions for specific directories or files, set this within `settings.json`:
```json
```json [settings]
{
"edit_predictions": {
"disabled_globs": ["~/.config/zed/settings.json"]
@@ -247,7 +247,7 @@ To disable edit predictions for specific directories or files, set this within `
To completely turn off edit prediction across all providers, explicitly set the settings to `none`, like so:
```json
```json [settings]
"features": {
"edit_prediction_provider": "none"
},
@@ -257,7 +257,7 @@ To completely turn off edit prediction across all providers, explicitly set the
To use GitHub Copilot as your provider, set this within `settings.json`:
```json
```json [settings]
{
"features": {
"edit_prediction_provider": "copilot"
@@ -271,7 +271,7 @@ You should be able to sign-in to GitHub Copilot by clicking on the Copilot icon
If your organization uses GitHub Copilot Enterprise, you can configure Zed to use your enterprise instance by specifying the enterprise URI in your `settings.json`:
```json
```json [settings]
{
"edit_predictions": {
"copilot": {
@@ -294,7 +294,7 @@ Copilot can provide multiple completion alternatives, and these can be navigated
To use Supermaven as your provider, set this within `settings.json`:
```json
```json [settings]
{
"features": {
"edit_prediction_provider": "supermaven"
+4 -4
View File
@@ -20,7 +20,7 @@ As of [Zed Stable v0.201.5](https://zed.dev/releases/stable/0.201.5) you should
If you'd like to bind this to a keyboard shortcut, you can do so by editing your `keymap.json` file via the `zed: open keymap` command to include:
```json
```json [keymap]
[
{
"bindings": {
@@ -36,7 +36,7 @@ The first time you create a Gemini CLI thread, Zed will install [@google/gemini-
By default, Zed will use this managed version of Gemini CLI even if you have it installed globally. However, you can configure it to use a version in your `PATH` by adding this to your settings:
```json
```json [settings]
{
"agent_servers": {
"gemini": {
@@ -77,7 +77,7 @@ Open the agent panel with {#kb agent::ToggleFocus}, and then use the `+` button
If you'd like to bind this to a keyboard shortcut, you can do so by editing your `keymap.json` file via the `zed: open keymap` command to include:
```json
```json [keymap]
[
{
"bindings": {
@@ -124,7 +124,7 @@ If you don't have a `CLAUDE.md` file, you can ask Claude Code to create one for
You can run any agent speaking ACP in Zed by changing your settings as follows:
```json
```json [settings]
{
"agent_servers": {
"Custom Agent": {
+1 -1
View File
@@ -18,7 +18,7 @@ A useful pattern here is to create a thread in the Agent Panel, and then mention
To create a custom keybinding that prefills a prompt, you can add the following format in your keymap:
```json
```json [keymap]
[
{
"context": "Editor && mode == full",
+15 -15
View File
@@ -43,7 +43,7 @@ Ensure your credentials have the following permissions set up:
Your IAM policy should look similar to:
```json
```json [settings]
{
"Version": "2012-10-17",
"Statement": [
@@ -65,7 +65,7 @@ With that done, choose one of the two authentication methods:
1. Ensure you have the AWS CLI installed and configured with a named profile
2. Open your `settings.json` (`zed: open settings`) and include the `bedrock` key under `language_models` with the following settings:
```json
```json [settings]
{
"language_models": {
"bedrock": {
@@ -120,7 +120,7 @@ Zed will also use the `ANTHROPIC_API_KEY` environment variable if it's defined.
You can add custom models to the Anthropic provider by adding the following to your Zed `settings.json`:
```json
```json [settings]
{
"language_models": {
"anthropic": {
@@ -147,14 +147,14 @@ Custom models will be listed in the model dropdown in the Agent Panel.
You can configure a model to use [extended thinking](https://docs.anthropic.com/en/docs/about-claude/models/extended-thinking-models) (if it supports it) by changing the mode in your model's configuration to `thinking`, for example:
```json
```json [settings]
{
"name": "claude-sonnet-4-latest",
"display_name": "claude-sonnet-4-thinking",
"max_tokens": 200000,
"mode": {
"type": "thinking",
"budget_tokens": 4_096
"budget_tokens": 4096
}
}
```
@@ -174,7 +174,7 @@ Zed will also use the `DEEPSEEK_API_KEY` environment variable if it's defined.
The Zed agent comes pre-configured to use the latest version for common models (DeepSeek Chat, DeepSeek Reasoner).
If you wish to use alternate models or customize the API endpoint, you can do so by adding the following to your Zed `settings.json`:
```json
```json [settings]
{
"language_models": {
"deepseek": {
@@ -231,7 +231,7 @@ By default, Zed will use `stable` versions of models, but you can use specific v
Here is an example of a custom Google AI model you could add to your Zed `settings.json`:
```json
```json [settings]
{
"language_models": {
"google": {
@@ -286,7 +286,7 @@ The Zed agent comes pre-configured with several Mistral models (codestral-latest
All the default models support tool use.
If you wish to use alternate models or customize their parameters, you can do so by adding the following to your Zed `settings.json`:
```json
```json [settings]
{
"language_models": {
"mistral": {
@@ -338,7 +338,7 @@ See [get_max_tokens in ollama.rs](https://github.com/zed-industries/zed/blob/mai
Depending on your hardware or use-case you may wish to limit or increase the context length for a specific model via settings.json:
```json
```json [settings]
{
"language_models": {
"ollama": {
@@ -406,7 +406,7 @@ Zed will also use the `OPENAI_API_KEY` environment variable if it's defined.
The Zed agent comes pre-configured to use the latest version for common models (GPT-5, GPT-5 mini, o4-mini, GPT-4.1, and others).
To use alternate models, perhaps a preview release, or if you wish to control the request parameters, you can do so by adding the following to your Zed `settings.json`:
```json
```json [settings]
{
"language_models": {
"openai": {
@@ -446,7 +446,7 @@ Then, fill up the input fields available in the modal.
To do it via your `settings.json`, add the following snippet under `language_models`:
```json
```json [settings]
{
"language_models": {
"openai_compatible": {
@@ -499,7 +499,7 @@ Zed will also use the `OPENROUTER_API_KEY` environment variable if it's defined.
You can add custom models to the OpenRouter provider by adding the following to your Zed `settings.json`:
```json
```json [settings]
{
"language_models": {
"open_router": {
@@ -555,7 +555,7 @@ Supported fields (all optional):
Example adding routing preferences to a model:
```json
```json [settings]
{
"language_models": {
"open_router": {
@@ -613,7 +613,7 @@ The xAI API key will be saved in your keychain. Zed will also use the `XAI_API_K
The Zed agent comes pre-configured with common Grok models. If you wish to use alternate models or customize their parameters, you can do so by adding the following to your Zed `settings.json`:
```json
```json [settings]
{
"language_models": {
"x_ai": {
@@ -643,7 +643,7 @@ The Zed agent comes pre-configured with common Grok models. If you wish to use a
You can use a custom API endpoint for different providers, as long as it's compatible with the provider's API structure.
To do so, add the following to your `settings.json`:
```json
```json [settings]
{
"language_models": {
"some-provider": {
+2 -2
View File
@@ -37,7 +37,7 @@ In any case, here are some of the ones available:
Creating an extension is not the only way to use MCP servers in Zed.
You can connect them by adding their commands directly to your `settings.json`, like so:
```json
```json [settings]
{
"context_servers": {
"your-mcp-server": {
@@ -79,7 +79,7 @@ However, if you want to ensure a given MCP server will be used, you can create [
As an example, [the Dagger team suggests](https://container-use.com/agent-integrations#zed) doing that with their [Container Use MCP server](https://zed.dev/extensions/mcp-server-container-use):
```json
```json [settings]
"agent": {
"profiles": {
"container-use": {