Docs Party 2024 (#15876)
Co-authored-by: Raunak Raj <nkray21111983@gmail.com> Co-authored-by: Thorsten Ball <mrnugget@gmail.com> Co-authored-by: Bennet <bennet@zed.dev> Co-authored-by: Marshall Bowers <elliott.codes@gmail.com> Co-authored-by: Joseph T Lyons <JosephTLyons@gmail.com> Co-authored-by: Mikayla <mikayla@zed.dev> Co-authored-by: Jason <jason@zed.dev> Co-authored-by: Antonio Scandurra <me@as-cii.com> Co-authored-by: Max Brunsfeld <maxbrunsfeld@gmail.com> Co-authored-by: Marshall <marshall@zed.dev> Co-authored-by: Nathan Sobo <nathan@zed.dev> Co-authored-by: Jason Mancuso <7891333+jvmncs@users.noreply.github.com> Co-authored-by: Piotr Osiewicz <24362066+osiewicz@users.noreply.github.com>
This commit is contained in:
parent
c633fa5a10
commit
eb3c4b0e46
100 changed files with 2564 additions and 457 deletions
|
@ -6,6 +6,13 @@ In addition to the settings described here, you may also want to change your [th
|
|||
|
||||
## Settings files
|
||||
|
||||
<!--
|
||||
TBD: Settings files. Rewrite with "remote settings" in mind (e.g. `local settings` on the remote host).
|
||||
Consider renaming `zed: Open Local Settings` to `zed: Open Project Settings`.
|
||||
|
||||
TBD: Add settings documentation about how settings are merged as overlays. E.g. project>local>default. Note how settings that are maps are merged, but settings that are arrays are replaced and must include the defaults.
|
||||
-->
|
||||
|
||||
Your settings file can be opened with `cmd-,` (on macOS) or `ctrl-,` (on Linux). By default it is located at `~/.config/zed/settings.json`, though if you have XDG_CONFIG_HOME in your environment on Linux it will be at `$XDG_CONFIG_HOME/zed/settings.json` instead.
|
||||
|
||||
This configuration is merged with any local configuration inside your projects. You can open the project settings by running `zed: Open Local Settings` from the command palette. This will create a `.zed` directory containing`.zed/settings.json`.
|
||||
|
@ -220,7 +227,7 @@ There are two options to choose from:
|
|||
|
||||
- Description: A list of globs representing files that inline completions should be disabled for.
|
||||
- Setting: `disabled_globs`
|
||||
- Default: [".env"]
|
||||
- Default: `[".env"]`
|
||||
|
||||
**Options**
|
||||
|
||||
|
@ -586,7 +593,7 @@ To override settings for a language, add an entry for that language server's nam
|
|||
}
|
||||
```
|
||||
|
||||
3. Or to use code actions provided by the connected language servers, use `"code_actions"` (requires Zed `0.130.x`):
|
||||
3. Or to use code actions provided by the connected language servers, use `"code_actions"`:
|
||||
|
||||
```json
|
||||
{
|
||||
|
@ -626,6 +633,10 @@ If any of the formatters fails, the subsequent ones will still be executed.
|
|||
|
||||
**Examples**
|
||||
|
||||
<!--
|
||||
TBD: Add Python Ruff source.organizeImports example
|
||||
-->
|
||||
|
||||
1. Organize imports on format in TypeScript and TSX buffers:
|
||||
|
||||
```json
|
||||
|
@ -645,7 +656,7 @@ If any of the formatters fails, the subsequent ones will still be executed.
|
|||
}
|
||||
```
|
||||
|
||||
2. Run ESLint `fixAll` code action when formatting (requires Zed `0.125.0`):
|
||||
2. Run ESLint `fixAll` code action when formatting:
|
||||
|
||||
```json
|
||||
{
|
||||
|
@ -659,7 +670,7 @@ If any of the formatters fails, the subsequent ones will still be executed.
|
|||
}
|
||||
```
|
||||
|
||||
3. Run only a single ESLint rule when using `fixAll` (requires Zed `0.125.0`):
|
||||
3. Run only a single ESLint rule when using `fixAll`:
|
||||
|
||||
```json
|
||||
{
|
||||
|
@ -779,7 +790,7 @@ To interpret all `.c` files as C++, files called `MyLockFile` as TOML and files
|
|||
|
||||
### Indent Guides
|
||||
|
||||
- Description: Configuration related to indent guides (requires Zed `0.138.0`). Indent guides can be configured separately for each language.
|
||||
- Description: Configuration related to indent guides. Indent guides can be configured separately for each language.
|
||||
- Setting: `indent_guides`
|
||||
- Default:
|
||||
|
||||
|
@ -848,7 +859,7 @@ To interpret all `.c` files as C++, files called `MyLockFile` as TOML and files
|
|||
|
||||
### Inline Git Blame
|
||||
|
||||
- Description: Whether or not to show git blame information inline, on the currently focused line (requires Zed `0.132.0`).
|
||||
- Description: Whether or not to show git blame information inline, on the currently focused line.
|
||||
- Setting: `inline_blame`
|
||||
- Default:
|
||||
|
||||
|
@ -1035,7 +1046,6 @@ These values take in the same options as the root-level settings with the same n
|
|||
## Preview tabs
|
||||
|
||||
- Description:
|
||||
(requires Zed `0.132.x`) \
|
||||
Preview tabs allow you to open files in preview mode, where they close automatically when you switch to another file unless you explicitly pin them. This is useful for quickly viewing files without cluttering your workspace. Preview tabs display their file names in italics. \
|
||||
There are several ways to convert a preview tab into a regular tab:
|
||||
|
||||
|
@ -1068,7 +1078,7 @@ These values take in the same options as the root-level settings with the same n
|
|||
|
||||
### Enable preview from code navigation
|
||||
|
||||
- Description: Determines whether a preview tab gets replaced when code navigation is used to navigate away from the tab (requires Zed `0.134.x`).
|
||||
- Description: Determines whether a preview tab gets replaced when code navigation is used to navigate away from the tab.
|
||||
- Setting: `enable_preview_from_code_navigation`
|
||||
- Default: `false`
|
||||
|
||||
|
@ -1244,25 +1254,27 @@ List of `integer` column numbers
|
|||
- Default:
|
||||
|
||||
```json
|
||||
"terminal": {
|
||||
"alternate_scroll": "off",
|
||||
"blinking": "terminal_controlled",
|
||||
"copy_on_select": false,
|
||||
"env": {},
|
||||
"font_family": null,
|
||||
"font_features": null,
|
||||
"font_size": null,
|
||||
"option_as_meta": true,
|
||||
"button": false,
|
||||
"shell": {},
|
||||
"toolbar": {
|
||||
"title": true
|
||||
},
|
||||
"working_directory": "current_project_directory"
|
||||
{
|
||||
"terminal": {
|
||||
"alternate_scroll": "off",
|
||||
"blinking": "terminal_controlled",
|
||||
"copy_on_select": false,
|
||||
"env": {},
|
||||
"font_family": null,
|
||||
"font_features": null,
|
||||
"font_size": null,
|
||||
"option_as_meta": true,
|
||||
"button": false,
|
||||
"shell": {},
|
||||
"toolbar": {
|
||||
"title": true
|
||||
},
|
||||
"working_directory": "current_project_directory"
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
### Alternate Scroll
|
||||
### Terminal: Alternate Scroll
|
||||
|
||||
- Description: Set whether Alternate Scroll mode (DECSET code: `?1007`) is active by default. Alternate Scroll mode converts mouse scroll events into up / down key presses when in the alternate screen (e.g. when running applications like vim or less). The terminal can still set and unset this mode with ANSI escape codes.
|
||||
- Setting: `alternate_scroll`
|
||||
|
@ -1274,7 +1286,9 @@ List of `integer` column numbers
|
|||
|
||||
```json
|
||||
{
|
||||
"alternate_scroll": "on"
|
||||
"terminal": {
|
||||
"alternate_scroll": "on"
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
|
@ -1282,11 +1296,13 @@ List of `integer` column numbers
|
|||
|
||||
```json
|
||||
{
|
||||
"alternate_scroll": "off"
|
||||
"terminal": {
|
||||
"alternate_scroll": "off"
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
### Blinking
|
||||
### Terminal: Blinking
|
||||
|
||||
- Description: Set the cursor blinking behavior in the terminal
|
||||
- Setting: `blinking`
|
||||
|
@ -1298,7 +1314,9 @@ List of `integer` column numbers
|
|||
|
||||
```json
|
||||
{
|
||||
"blinking": "off"
|
||||
"terminal": {
|
||||
"blinking": "off"
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
|
@ -1306,17 +1324,23 @@ List of `integer` column numbers
|
|||
|
||||
```json
|
||||
{
|
||||
"blinking": "terminal_controlled"
|
||||
"terminal": {
|
||||
"blinking": "terminal_controlled"
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
3. Always blink the cursor, ignore the terminal mode
|
||||
|
||||
```json
|
||||
"blinking": "on",
|
||||
{
|
||||
"terminal": {
|
||||
"blinking": "on"
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
### Copy On Select
|
||||
### Terminal: Copy On Select
|
||||
|
||||
- Description: Whether or not selecting text in the terminal will automatically copy to the system clipboard.
|
||||
- Setting: `copy_on_select`
|
||||
|
@ -1326,7 +1350,17 @@ List of `integer` column numbers
|
|||
|
||||
`boolean` values
|
||||
|
||||
### Env
|
||||
**Example**
|
||||
|
||||
```json
|
||||
{
|
||||
"terminal": {
|
||||
"copy_on_select": true
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
### Terminal: Env
|
||||
|
||||
- Description: Any key-value pairs added to this object will be added to the terminal's environment. Keys must be unique, use `:` to separate multiple values in a single variable
|
||||
- Setting: `env`
|
||||
|
@ -1335,13 +1369,17 @@ List of `integer` column numbers
|
|||
**Example**
|
||||
|
||||
```json
|
||||
"env": {
|
||||
"ZED": "1",
|
||||
"KEY": "value1:value2"
|
||||
{
|
||||
"terminal": {
|
||||
"env": {
|
||||
"ZED": "1",
|
||||
"KEY": "value1:value2"
|
||||
}
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
### Font Size
|
||||
### Terminal: Font Size
|
||||
|
||||
- Description: What font size to use for the terminal. When not set defaults to matching the editor's font size
|
||||
- Setting: `font_size`
|
||||
|
@ -1351,7 +1389,15 @@ List of `integer` column numbers
|
|||
|
||||
`integer` values
|
||||
|
||||
### Font Family
|
||||
```json
|
||||
{
|
||||
"terminal": {
|
||||
"font_size": 15
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
### Terminal: Font Family
|
||||
|
||||
- Description: What font to use for the terminal. When not set, defaults to matching the editor's font.
|
||||
- Setting: `font_family`
|
||||
|
@ -1361,7 +1407,15 @@ List of `integer` column numbers
|
|||
|
||||
The name of any font family installed on the user's system
|
||||
|
||||
### Font Features
|
||||
```json
|
||||
{
|
||||
"terminal": {
|
||||
"font_family": "Berkeley Mono"
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
### Terminal: Font Features
|
||||
|
||||
- Description: What font features to use for the terminal. When not set, defaults to matching the editor's font features.
|
||||
- Setting: `font_features`
|
||||
|
@ -1371,7 +1425,18 @@ The name of any font family installed on the user's system
|
|||
|
||||
See Buffer Font Features
|
||||
|
||||
### Option As Meta
|
||||
```jsonc
|
||||
{
|
||||
"terminal": {
|
||||
"font_features": {
|
||||
"calt": false,
|
||||
// See Buffer Font Features for more features
|
||||
},
|
||||
},
|
||||
}
|
||||
```
|
||||
|
||||
### Terminal: Option As Meta
|
||||
|
||||
- Description: Re-interprets the option keys to act like a 'meta' key, like in Emacs.
|
||||
- Setting: `option_as_meta`
|
||||
|
@ -1381,7 +1446,15 @@ See Buffer Font Features
|
|||
|
||||
`boolean` values
|
||||
|
||||
### Shell
|
||||
```json
|
||||
{
|
||||
"terminal": {
|
||||
"option_as_meta": true
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
### Terminal: Shell
|
||||
|
||||
- Description: What shell to use when launching the terminal.
|
||||
- Setting: `shell`
|
||||
|
@ -1393,46 +1466,60 @@ See Buffer Font Features
|
|||
|
||||
```json
|
||||
{
|
||||
"shell": "system"
|
||||
"terminal": {
|
||||
"shell": "system"
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
2. A program to launch:
|
||||
|
||||
```json
|
||||
"shell": {
|
||||
"program": "sh"
|
||||
{
|
||||
"terminal": {
|
||||
"shell": {
|
||||
"program": "sh"
|
||||
}
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
3. A program with arguments:
|
||||
|
||||
```json
|
||||
"shell": {
|
||||
"with_arguments": {
|
||||
"program": "/bin/bash",
|
||||
"args": ["--login"]
|
||||
{
|
||||
"terminal": {
|
||||
"shell": {
|
||||
"with_arguments": {
|
||||
"program": "/bin/bash",
|
||||
"args": ["--login"]
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
## Terminal Toolbar
|
||||
## Terminal: Toolbar
|
||||
|
||||
- Description: Whether or not to show various elements in the terminal toolbar. It only affects terminals placed in the editor pane.
|
||||
- Setting: `toolbar`
|
||||
- Default:
|
||||
|
||||
```json
|
||||
"toolbar": {
|
||||
"title": true,
|
||||
},
|
||||
{
|
||||
"terminal": {
|
||||
"toolbar": {
|
||||
"title": true
|
||||
}
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
**Options**
|
||||
|
||||
At the moment, only the `title` option is available, it controls displaying of the terminal title that can be changed via `PROMPT_COMMAND`. If the title is hidden, the terminal toolbar is not displayed.
|
||||
|
||||
### Terminal Button
|
||||
### Terminal: Button
|
||||
|
||||
- Description: Control to show or hide the terminal button in the status bar
|
||||
- Setting: `button`
|
||||
|
@ -1442,7 +1529,15 @@ At the moment, only the `title` option is available, it controls displaying of t
|
|||
|
||||
`boolean` values
|
||||
|
||||
### Working Directory
|
||||
```json
|
||||
{
|
||||
"terminal": {
|
||||
"button": false
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
### Terminal: Working Directory
|
||||
|
||||
- Description: What working directory to use when launching the terminal.
|
||||
- Setting: `working_directory`
|
||||
|
@ -1454,7 +1549,9 @@ At the moment, only the `title` option is available, it controls displaying of t
|
|||
|
||||
```json
|
||||
{
|
||||
"working_directory": "current_project_directory"
|
||||
"terminal": {
|
||||
"working_directory": "current_project_directory"
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
|
@ -1462,7 +1559,9 @@ At the moment, only the `title` option is available, it controls displaying of t
|
|||
|
||||
```json
|
||||
{
|
||||
"working_directory": "first_project_directory"
|
||||
"terminal": {
|
||||
"working_directory": "first_project_directory"
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
|
@ -1470,16 +1569,22 @@ At the moment, only the `title` option is available, it controls displaying of t
|
|||
|
||||
```json
|
||||
{
|
||||
"working_directory": "always_home"
|
||||
"terminal": {
|
||||
"working_directory": "always_home"
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
4. Always use a specific directory. This value will be shell expanded. If this path is not a valid directory the terminal will default to this platform's home directory.
|
||||
|
||||
```json
|
||||
"working_directory": {
|
||||
"always": {
|
||||
"directory": "~/zed/projects/"
|
||||
{
|
||||
"terminal": {
|
||||
"working_directory": {
|
||||
"always": {
|
||||
"directory": "~/zed/projects/"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
```
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue