diff --git a/docs/src/ai/edit-prediction.md b/docs/src/ai/edit-prediction.md index 3d0f8c5141a40daa66fc3689deb2d0363acf273a..56b1c1260ec98bc82de337ac492b1b4aa40723d8 100644 --- a/docs/src/ai/edit-prediction.md +++ b/docs/src/ai/edit-prediction.md @@ -301,6 +301,8 @@ Edit Prediction also works with other providers. ### GitHub Copilot {#github-copilot} +> **Changed in Preview (v0.225).** See [release notes](/releases#0.225). + To use GitHub Copilot as your provider, set this in your settings file ([how to edit](../configuring-zed.md#settings-files)): ```json [settings] diff --git a/docs/src/finding-navigating.md b/docs/src/finding-navigating.md index 051c21262a1d8d49f439989007f5246f117b4625..b5f6e3fff774281d699276449c11602df543a021 100644 --- a/docs/src/finding-navigating.md +++ b/docs/src/finding-navigating.md @@ -19,7 +19,19 @@ Open any file in your project with {#kb file_finder::Toggle}. Type part of the f ## Project Search -Search across all files with {#kb pane::DeploySearch}. Results appear in a [multibuffer](./multibuffers.md), letting you edit matches in place. +> **Changed in Preview (v0.225).** See [release notes](/releases#0.225). + +Search across all files with {#kb pane::DeploySearch}. Start typing in the search field to begin searching—results appear as you type. + +Results appear in a [multibuffer](./multibuffers.md), letting you edit matches in place. + +To disable automatic search and require pressing Enter instead, open the Settings Editor ({#kb zed::OpenSettings}), search for "search on input", and toggle the setting off. Or add this to your settings.json: + +```json +{ + "search_on_input": false +} +``` ## Go to Definition diff --git a/docs/src/git.md b/docs/src/git.md index eecd47124f2ac5189a512b4450f5eba5242e3617..5e46dfc322a21dca186dd08389fbf6f72a777288 100644 --- a/docs/src/git.md +++ b/docs/src/git.md @@ -70,6 +70,33 @@ To disable word diff for specific languages only, add this to your settings.json } ``` +### Diff View Styles + +> **Changed in Preview (v0.225).** See [release notes](/releases#0.225). + +Zed displays diffs in two modes: **split** (side-by-side comparison) or **unified** (inline changes). Split view is the default. + +#### Changing the diff view + +Open the Settings Editor ({#kb zed::OpenSettings}) and search for "diff view style". Select either **Split** or **Unified**. + +To change the default, add this to your `settings.json`: + +```json +{ + "diff_view_style": "unified" +} +``` + +See [Configuring Zed](./configuring-zed.md) for more about the Settings Editor. + +#### Split vs unified + +- **Split**: Shows the original and modified versions side by side. Useful for comparing file structure or reviewing large changes. +- **Unified**: Shows changes inline with additions and deletions in a single view. Useful for focusing on specific line changes. + +You can switch between modes at any time. Your preference applies to [Project Diff](#project-diff), [File History](#file-history), and [Stash Diff View](#stash-diff-view). These diff views function as [multibuffers](./multibuffers.md), allowing you to edit multiple excerpts simultaneously. + ## File History File History shows the commit history for an individual file. Each entry displays the commit's author, timestamp, and message. Selecting a commit opens a diff view filtered to show only the changes made to that file in that commit. diff --git a/docs/src/globs.md b/docs/src/globs.md index 94c866394bcc5cf90222cb9730bf1a463146a1f7..26ecf51da8c0420fb65428eb296887b603a99eb5 100644 --- a/docs/src/globs.md +++ b/docs/src/globs.md @@ -5,7 +5,7 @@ description: How glob patterns work in Zed for file matching, search filtering, # Globs -Zed supports the use of [glob]() patterns that are the formal name for Unix shell-style path matching wildcards like `*.md` or `docs/src/**/*.md` supported by sh, bash, zsh, etc. A glob is similar but distinct from a [regex (regular expression)](https://en.wikipedia.org/wiki/Regular_expression). You may be In Zed these are commonly used when matching filenames. +Zed supports the use of [glob]() patterns that are the formal name for Unix shell-style path matching wildcards like `*.md` or `docs/src/**/*.md` supported by sh, bash, zsh, etc. A glob is similar but distinct from a [regex (regular expression)](https://en.wikipedia.org/wiki/Regular_expression). In Zed, globs are commonly used when matching filenames. ## Glob Flavor @@ -22,6 +22,19 @@ The `glob` crate is implemented entirely in rust and does not rely on the `glob` A glob "pattern" is used to match a file name or complete file path. For example, when using "Search all files" {#kb project_search::ToggleFocus} you can click the funnel shaped Toggle Filters" button or {#kb project_search::ToggleFilters} and it will show additional search fields for "Include" and "Exclude" which support specifying glob patterns for matching file paths and file names. +### Multiple Patterns + +> **Changed in Preview (v0.225).** See [release notes](/releases#0.225). + +You can specify multiple glob patterns in Project Search filters by separating them with commas. When using comma-separated patterns, Zed correctly handles braces within individual patterns: + +- `*.ts, *.tsx` — Match TypeScript and TSX files +- `src/{components,utils}/**/*.ts, tests/**/*.test.ts` — Match TypeScript files in specific directories plus test files + +Each pattern is evaluated independently. Commas inside braces (like `{a,b}`) are treated as part of the pattern, not as separators. + +**Important:** While braces are preserved in patterns, Zed does not expand them into multiple patterns. The pattern `src/{a,b}/*.ts` matches the literal path structure, not `src/a/*.ts` OR `src/b/*.ts`. This differs from shell behavior. + When creating a glob pattern you can use one or multiple special characters: | Special Character | Meaning | @@ -35,7 +48,7 @@ When creating a glob pattern you can use one or multiple special characters: Notes: -1. Shell-style brace-expansions like `{a,b,c}` are not supported. +1. Brace characters `{` and `}` are literal pattern characters, not expansion operators. The pattern `src/{a,b}/*.ts` matches paths containing the literal text `{a,b}`, not paths matching either `src/a/*.ts` or `src/b/*.ts` as in shell globbing. 2. To match a literal `-` character inside brackets it must come first `[-abc]` or last `[abc-]`. 3. To match the literal `[` character use `[[]` or put it as the first character in the group `[[abc]`. 4. To match the literal `]` character use `[]]` or put it as the last character in the group `[abc]]`. diff --git a/docs/src/languages/json.md b/docs/src/languages/json.md index 5da6e4c5ae61b1d7f54317bca86c3b6fee61bf82..253669b2fca3a5007e8ea748a8602d85575b24ce 100644 --- a/docs/src/languages/json.md +++ b/docs/src/languages/json.md @@ -54,9 +54,9 @@ For example to for a `.luarc.json` for use with [lua-language-server](https://gi ### Schema Specification via Settings -You can alternatively associate JSON Schemas with file paths by via Zed LSP settings. +> **Preview:** This feature is available in Zed Preview. It will be included in the next Stable release. -To +You can associate JSON Schemas with file paths using relative paths in your language server settings. Zed resolves paths relative to your project root: ```json [settings] "lsp": { @@ -64,6 +64,14 @@ To "settings": { "json": { "schemas": [ + { + "fileMatch": ["config/*.json"], + "url": "./schemas/custom-schema.json" + }, + { + "fileMatch": ["*.config.json"], + "url": "~/global-schemas/shared.json" + }, { "fileMatch": ["*/*.luarc.json"], "url": "https://raw.githubusercontent.com/sumneko/vscode-lua/master/setting/schema.json" @@ -75,6 +83,8 @@ To } ``` +Paths starting with `./` resolve relative to the worktree root. Paths starting with `~/` expand to your home directory. + You can also pass any of the [supported settings](https://github.com/Microsoft/vscode/blob/main/extensions/json-language-features/server/README.md#settings) to json-language-server by specifying them in your Zed settings.json: