Fix docs format_on_save
value is not a boolean (#18619)
Fixed [Configuring Languages](https://zed.dev/docs/configuring-languages) docs using boolean value for `format_on_save` option although it accepts string values of `"on"` or `"off"` Details: The documentation on [configuring languages](https://zed.dev/docs/configuring-languages) states the use of boolean values for the `format_on_save` option although the [configuration reference](https://zed.dev/docs/configuring-zed#format-on-save) only allows the usage of string values `"on"` or `"off"`. In fact using boolean values will not work and won't translate to `on` or `off` Release Notes: - N/A
This commit is contained in:
parent
563a1dcbab
commit
e80cbab93f
1 changed files with 5 additions and 5 deletions
|
@ -33,7 +33,7 @@ Here's an example of language-specific settings:
|
||||||
"Python": {
|
"Python": {
|
||||||
"tab_size": 4,
|
"tab_size": 4,
|
||||||
"formatter": "language_server",
|
"formatter": "language_server",
|
||||||
"format_on_save": true
|
"format_on_save": "on"
|
||||||
},
|
},
|
||||||
"JavaScript": {
|
"JavaScript": {
|
||||||
"tab_size": 2,
|
"tab_size": 2,
|
||||||
|
@ -209,11 +209,11 @@ Zed supports both built-in and external formatters. Configure formatters globall
|
||||||
"arguments": ["--stdin-filepath", "{buffer_path}"]
|
"arguments": ["--stdin-filepath", "{buffer_path}"]
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"format_on_save": true
|
"format_on_save": "on"
|
||||||
},
|
},
|
||||||
"Rust": {
|
"Rust": {
|
||||||
"formatter": "language_server",
|
"formatter": "language_server",
|
||||||
"format_on_save": true
|
"format_on_save": "on"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
@ -225,7 +225,7 @@ To disable formatting for a specific language:
|
||||||
```json
|
```json
|
||||||
"languages": {
|
"languages": {
|
||||||
"Markdown": {
|
"Markdown": {
|
||||||
"format_on_save": false
|
"format_on_save": "off"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
@ -276,7 +276,7 @@ Zed allows you to run both formatting and linting on save. Here's an example tha
|
||||||
"code_actions_on_format": {
|
"code_actions_on_format": {
|
||||||
"source.fixAll.eslint": true
|
"source.fixAll.eslint": true
|
||||||
},
|
},
|
||||||
"format_on_save": true
|
"format_on_save": "on"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue