Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.
docs: Remove/fix mentions of `code_actions_on_format` post #39983 (#40040)
Ben Kunkledeef58bef72d
diff --git a/docs/src/configuring-languages.md b/docs/src/configuring-languages.mdindex ef5adf97a06..afb5729ff71 100644--- a/docs/src/configuring-languages.md+++ b/docs/src/configuring-languages.md@@ -320,8 +320,8 @@ To run linter fixes automatically on save:```json"languages": {"JavaScript": {- "code_actions_on_format": {- "source.fixAll.eslint": true+ "formatter": {+ "code_action": "source.fixAll.eslint"}}}@@ -334,15 +334,17 @@ Zed allows you to run both formatting and linting on save. Here's an example tha```json"languages": {"JavaScript": {- "formatter": {- "external": {- "command": "prettier",- "arguments": ["--stdin-filepath", "{buffer_path}"]+ "formatter": [+ {+ "code_action": "source.fixAll.eslint"+ },+ {+ "external": {+ "command": "prettier",+ "arguments": ["--stdin-filepath", "{buffer_path}"]+ }}- },- "code_actions_on_format": {- "source.fixAll.eslint": true- },+ ],"format_on_save": "on"}}diff --git a/docs/src/configuring-zed.md b/docs/src/configuring-zed.mdindex 6acb8ca7178..6f2e1319ee6 100644--- a/docs/src/configuring-zed.md+++ b/docs/src/configuring-zed.md@@ -1745,74 +1745,6 @@ WARNING: `{buffer_path}` should not be used to direct your formatter to read froHere `rust-analyzer` will be used first to format the code, followed by a call of sed.If any of the formatters fails, the subsequent ones will still be executed.-## Code Actions On Format--- Description: The code actions to perform with the primary language server when formatting the buffer.-- Setting: `code_actions_on_format`-- Default: `{}`, except for Go it's `{ "source.organizeImports": true }`--**Examples**--<!---TBD: Add Python Ruff source.organizeImports example--->--1. Organize imports on format in TypeScript and TSX buffers:--```json-{- "languages": {- "TypeScript": {- "code_actions_on_format": {- "source.organizeImports": true- }- },- "TSX": {- "code_actions_on_format": {- "source.organizeImports": true- }- }- }-}-```--2. Run ESLint `fixAll` code action when formatting:--```json-{- "languages": {- "JavaScript": {- "code_actions_on_format": {- "source.fixAll.eslint": true- }- }- }-}-```--3. Run only a single ESLint rule when using `fixAll`:--```json-{- "languages": {- "JavaScript": {- "code_actions_on_format": {- "source.fixAll.eslint": true- }- }- },- "lsp": {- "eslint": {- "settings": {- "codeActionOnSave": {- "rules": ["import/order"]- }- }- }- }-}-```-## Auto close- Description: Whether to automatically add matching closing characters when typing opening parenthesis, bracket, brace, single or double quote characters.diff --git a/docs/src/languages/javascript.md b/docs/src/languages/javascript.mdindex c71071a9b37..9901708f333 100644--- a/docs/src/languages/javascript.md+++ b/docs/src/languages/javascript.md@@ -49,8 +49,8 @@ You can configure Zed to format code using `eslint --fix` by running the ESLint{"languages": {"JavaScript": {- "code_actions_on_format": {- "source.fixAll.eslint": true+ "formatter": {+ "code_action": "source.fixAll.eslint"}}}@@ -63,8 +63,8 @@ You can also only execute a single ESLint rule when using `fixAll`:{"languages": {"JavaScript": {- "code_actions_on_format": {- "source.fixAll.eslint": true+ "formatter": {+ "code_action": "source.fixAll.eslint"}}},