Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"Language-specific workspace settings" does not override "Language-specific user settings" #227180

Closed
nabe1653 opened this issue Aug 30, 2024 · 4 comments
Assignees
Labels
*as-designed Described behavior is as designed

Comments

@nabe1653
Copy link

Type: Bug

I'd like to use defaultFormatter with biome extention for some TypeScript workspace that has biome. But workspace setting does not override user setting.

I have user setting like below:

    "[typescript]": {
        "editor.defaultFormatter": "esbenp.prettier-vscode",
        "editor.tabSize": 2,
    },

I set workspace setting like below:

  "[javascript][typescript][svelte]": {
    "editor.tabSize": 2,
    "editor.insertSpaces": true,
    "editor.defaultFormatter": "biomejs.biome"
  },

If I remove the defaultFormatter line in user setting, vscode uses workspace's setting so those have correct values.

Document said "Language-specific workspace settings" is stronger than "Language-specific user settings": https://code.visualstudio.com/docs/getstarted/settings#_settings-precedence

Thank you.

VS Code version: Code 1.92.2 (fee1edb, 2024-08-14T17:29:30.058Z)
OS version: Windows_NT x64 10.0.19045
Modes:

System Info
Item Value
CPUs Intel(R) Core(TM) i5-8500 CPU @ 3.00GHz (6 x 3000)
GPU Status 2d_canvas: enabled
canvas_oop_rasterization: enabled_on
direct_rendering_display_compositor: disabled_off_ok
gpu_compositing: enabled
multiple_raster_threads: enabled_on
opengl: enabled_on
rasterization: enabled
raw_draw: disabled_off_ok
skia_graphite: disabled_off
video_decode: enabled
video_encode: enabled
vulkan: disabled_off
webgl: enabled
webgl2: enabled
webgpu: enabled
webnn: disabled_off
Load (avg) undefined
Memory (System) 31.78GB (13.83GB free)
Process Argv --crash-reporter-id ca2a1b94-1896-42fa-87dc-e58738a43fa3
Screen Reader yes
VM 0%
@nabe1653
Copy link
Author

And... now I tried to set workspace like below, then it works.

  "[typescript]": {
    "editor.defaultFormatter": "biomejs.biome"
  },
  "[javascript][svelte]": {
    "editor.defaultFormatter": "biomejs.biome"
  },

So it may have some problem about language listing.

@rzhao271
Copy link
Contributor

The behaviour is documented in the section below your link https://code.visualstudio.com/docs/getstarted/settings#_note-about-multiple-language-specific-settings.

@rzhao271 rzhao271 added the *as-designed Described behavior is as designed label Aug 30, 2024
Copy link

The described behavior is how it is expected to work. If you disagree, please explain what is expected and what is not in more detail. See also our issue reporting guidelines.

Happy Coding!

@vs-code-engineering vs-code-engineering bot closed this as not planned Won't fix, can't repro, duplicate, stale Aug 30, 2024
@rzhao271 rzhao271 closed this as not planned Won't fix, can't repro, duplicate, stale Aug 30, 2024
@nabe1653
Copy link
Author

nabe1653 commented Sep 2, 2024

Oh, So sorry about I've not read the document completely.

However, it's a bit confusing that a high-priority workspace setting is ignored by a low-priority user setting.
It would make sense if "when a high-priority setting (workspace) with multiple languages ​​is found, lower other setting is ignored and not merged," but...
Anyway, I and our teams will use only single language format.

Thank you for your reply despite your busy schedule!

@vs-code-engineering vs-code-engineering bot locked and limited conversation to collaborators Oct 14, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
*as-designed Described behavior is as designed
Projects
None yet
Development

No branches or pull requests

2 participants