Document formatter: code_actions (#10157)

This documents what was introduced in #10121 and shipped in 0.130.x

Release Notes:

- N/A
This commit is contained in:
Thorsten Ball 2024-04-04 14:12:28 +02:00 committed by GitHub
parent 5b4ff74dca
commit ee1b1779f1
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 32 additions and 0 deletions

View file

@ -306,6 +306,21 @@ 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`):
```json
{
"formatter": {
"code_actions": {
// Use ESLint's --fix:
"source.fixAll.eslint": true,
// Organize imports on save:
"source.organizeImports": true
}
}
}
```
## Code Actions On Format
- Description: The code actions to perform with the primary language server when formatting the buffer.