Skip to content

docs: Remove/fix mentions of code_actions_on_format post #39983 - #40040

Merged
probably-neb merged 1 commit into
mainfrom
remove-code-actions-on-format-from-docs
Oct 11, 2025
Merged

docs: Remove/fix mentions of code_actions_on_format post #39983#40040
probably-neb merged 1 commit into
mainfrom
remove-code-actions-on-format-from-docs

Conversation

@probably-neb

@probably-neb probably-neb commented Oct 11, 2025

Copy link
Copy Markdown
Collaborator

Follow up for: #39983

Release Notes:

  • N/A or Added/Fixed/Improved ...

@cla-bot cla-bot Bot added the cla-signed The user has signed the Contributor License Agreement label Oct 11, 2025
@probably-neb
probably-neb enabled auto-merge (squash) October 11, 2025 23:53
@probably-neb
probably-neb merged commit deef58b into main Oct 11, 2025
23 checks passed
@probably-neb
probably-neb deleted the remove-code-actions-on-format-from-docs branch October 11, 2025 23:55
@abdelq

abdelq commented Oct 12, 2025

Copy link
Copy Markdown
Contributor

I have a global

"code_actions_on_format": { "source.organizeImports": true }

with formatter set to auto.

It's not clear how the new config would look like when I'm looking at the docs or the default.json comments.
"formatter": ["auto", { "code_action": "source.organizeImports" }]?

@probably-neb

Copy link
Copy Markdown
Collaborator Author

Good catch @abdelq! Thanks! Your setup was/would be broken by #39983, however after #40113 it should work again.

probably-neb added a commit that referenced this pull request Oct 13, 2025
Follow up for: #39983 and
#40040 (comment)

Previously it was possible to have formatting done using prettier or
language server using `"formatter": "auto"` and specify code actions to
apply on format using the `"code_actions_on_format"` setting. However,
post #39983 this is no longer possible due to the removal of the
`"code_actions_on_format"` setting. To rectify this regression, this PR
makes it so that the `"auto"` and `"language_server"` strings that were
previously only allowed as top level values on the `"formatter"` key,
are now allowed as format steps like so:
```json
{
      "formatter": ["auto", "language_server"]
}
```

Therefore to replicate the previous behavior using `"auto"` and
`"code_actions_on_format"` you can use the following configuration:

```json
{
      "formatter": [{"code_action": ...}, "auto"]
}
```

Release Notes:

- N/A *or* Added/Fixed/Improved ...
probably-neb added a commit that referenced this pull request Oct 13, 2025
Follow up for: #39983 and
#40040 (comment)

Previously it was possible to have formatting done using prettier or
language server using `"formatter": "auto"` and specify code actions to
apply on format using the `"code_actions_on_format"` setting. However,
post #39983 this is no longer possible due to the removal of the
`"code_actions_on_format"` setting. To rectify this regression, this PR
makes it so that the `"auto"` and `"language_server"` strings that were
previously only allowed as top level values on the `"formatter"` key,
are now allowed as format steps like so:
```json
{
      "formatter": ["auto", "language_server"]
}
```

Therefore to replicate the previous behavior using `"auto"` and
`"code_actions_on_format"` you can use the following configuration:

```json
{
      "formatter": [{"code_action": ...}, "auto"]
}
```

Release Notes:

- N/A *or* Added/Fixed/Improved ...
@injust

injust commented Oct 23, 2025

Copy link
Copy Markdown
Contributor

@probably-neb I think some of the docs removals in this PR need to be reverted, given #40113.

jasonsmithio pushed a commit to paddleboarddev/paddleboard that referenced this pull request May 31, 2026
Follow up for: #39983 and
zed-industries/zed#40040 (comment)

Previously it was possible to have formatting done using prettier or
language server using `"formatter": "auto"` and specify code actions to
apply on format using the `"code_actions_on_format"` setting. However,
post #39983 this is no longer possible due to the removal of the
`"code_actions_on_format"` setting. To rectify this regression, this PR
makes it so that the `"auto"` and `"language_server"` strings that were
previously only allowed as top level values on the `"formatter"` key,
are now allowed as format steps like so:
```json
{
      "formatter": ["auto", "language_server"]
}
```

Therefore to replicate the previous behavior using `"auto"` and
`"code_actions_on_format"` you can use the following configuration:

```json
{
      "formatter": [{"code_action": ...}, "auto"]
}
```

Release Notes:

- N/A *or* Added/Fixed/Improved ...
jolutz pushed a commit to jolutz/zed that referenced this pull request Aug 8, 2026
…ries#39983 (zed-industries#40040)

Closes #ISSUE

Release Notes:

- N/A *or* Added/Fixed/Improved ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cla-signed The user has signed the Contributor License Agreement

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants