Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 14 additions & 2 deletions docs/guide/ide-integration.md
Original file line number Diff line number Diff line change
Expand Up @@ -82,14 +82,26 @@ You can also manually set up the Zed config:
"JavaScript": {
"format_on_save": "on",
"prettier": { "allowed": false },
"formatter": [{ "language_server": { "name": "oxfmt" } }],
"code_action": "source.fixAll.oxc"
"formatter": [
{ "language_server": { "name": "oxfmt" } },
{ "code_action": "source.fixAll.oxc" }
Comment thread
joschuba marked this conversation as resolved.
]
},
"JSX": {
"format_on_save": "on",
"prettier": { "allowed": false },
"formatter": [{ "language_server": { "name": "oxfmt" } }]
},
"TypeScript": {
"format_on_save": "on",
"prettier": { "allowed": false },
"formatter": [{ "language_server": { "name": "oxfmt" } }]
},
"TSX": {
"format_on_save": "on",
"prettier": { "allowed": false },
"formatter": [{ "language_server": { "name": "oxfmt" } }]
},
"Vue.js": {
"format_on_save": "on",
"prettier": { "allowed": false },
Expand Down
8 changes: 5 additions & 3 deletions packages/cli/src/utils/editor.ts
Original file line number Diff line number Diff line change
Expand Up @@ -87,9 +87,11 @@ const ZED_SETTINGS = {
{
format_on_save: 'on',
prettier: { allowed: false },
formatter: [{ language_server: { name: 'oxfmt' } }],
// Only the JavaScript entry runs the oxc fix-all code action on save
...(language === 'JavaScript' ? { code_action: 'source.fixAll.oxc' } : {}),
formatter: [
{ language_server: { name: 'oxfmt' } },
// Only the JavaScript entry runs the oxc fix-all code action on save.
...(language === 'JavaScript' ? [{ code_action: 'source.fixAll.oxc' }] : []),
],
},
]),
),
Expand Down
Loading