Description
The Problem
When generating configurations for VS Code, the current template only outputs a global editor.defaultFormatter.
Because of VS Code's Settings Precedence, any language-specific configuration in a user's global settings.json will take priority over a workspace-level global setting. This means if a user has Prettier set specifically for TypeScript in their global settings, the generated workspace setting for oxc-vscode is ignored.
Precedence Conflict
- User Settings (Global - High Priority):
"[typescript]": { "editor.defaultFormatter": "esbenp.prettier-vscode" }
- Generated Workspace Settings (Low Priority):
"editor.defaultFormatter": "oxc.oxc-vscode"
Result: VS Code uses Prettier, ignoring the project's intent to use OXC.
Suggested solution
When the VS Code configuration is generated, the tool should include language-specific blocks based on the project template (e.g., [typescript], [typescriptreact], [javascript]). This ensures the workspace setting correctly overrides any existing user-level language settings.
Target Output for .vscode/settings.json for typescript react project:
{
"editor.defaultFormatter": "oxc.oxc-vscode",
"[typescript]": {
"editor.defaultFormatter": "oxc.oxc-vscode"
},
"[typescriptreact]": {
"editor.defaultFormatter": "oxc.oxc-vscode"
}
}
Alternative
No response
Additional context
No response
Validations
Description
The Problem
When generating configurations for VS Code, the current template only outputs a global
editor.defaultFormatter.Because of VS Code's Settings Precedence, any language-specific configuration in a user's global
settings.jsonwill take priority over a workspace-level global setting. This means if a user has Prettier set specifically for TypeScript in their global settings, the generated workspace setting foroxc-vscodeis ignored.Precedence Conflict
Result: VS Code uses Prettier, ignoring the project's intent to use OXC.
Suggested solution
When the VS Code configuration is generated, the tool should include language-specific blocks based on the project template (e.g.,
[typescript],[typescriptreact],[javascript]). This ensures the workspace setting correctly overrides any existing user-level language settings.Target Output for
.vscode/settings.jsonfor typescript react project:{ "editor.defaultFormatter": "oxc.oxc-vscode", "[typescript]": { "editor.defaultFormatter": "oxc.oxc-vscode" }, "[typescriptreact]": { "editor.defaultFormatter": "oxc.oxc-vscode" } }Alternative
No response
Additional context
No response
Validations