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

local language specific setting priority is lower than user level language specific setting #168411

Open
tjx666 opened this issue Dec 8, 2022 · 4 comments
Assignees
Labels
bug Issue identified by VS Code Team member as probable bug config VS Code configuration, set up issues
Milestone

Comments

@tjx666
Copy link
Contributor

tjx666 commented Dec 8, 2022

reproduce:

  1. install esbenp.prettier-vscode
  2. add following settings to .vscode/settings.json
    "[javascript][javascriptreact][typescript][typescriptreact][vue][json][jsonc][html][css][less][markdown][xml][yaml][svg]": {
        "editor.defaultFormatter": "esbenp.prettier-vscode"
    }
  1. add following settings to ~/Library/Application Support/Code/User/settings.json
    "[javascript]": {
        "editor.defaultFormatter": null
    },
  1. open a js file, try to format it, will warning:

image

Version: 1.74.0 (Universal)
Commit: 5235c6bb189b60b01b1f49062f4ffa42384f8c91
Date: 2022-12-05T16:43:37.594Z
Electron: 19.1.8
Chromium: 102.0.5005.167
Node.js: 16.14.2
V8: 10.2.154.15-electron.0
OS: Darwin x64 22.1.0
Sandboxed: No
@rzhao271 rzhao271 assigned sandy081 and unassigned rzhao271 Dec 8, 2022
@sandy081 sandy081 added feature-request Request for new features or functionality config VS Code configuration, set up issues labels Dec 9, 2022
@sandy081 sandy081 added this to the Backlog milestone Dec 9, 2022
@tjx666
Copy link
Contributor Author

tjx666 commented Dec 11, 2022

@sandy081 I thnk this is a bug not a feature request

@SrTobi
Copy link
Contributor

SrTobi commented Feb 20, 2023

Observed this bug as well. It's very annoying when the workspace sets a different formatter and then that is not picked up

@SrTobi
Copy link
Contributor

SrTobi commented Feb 20, 2023

this seems also more complicated... when I do a single "[typescript]" next to the multi-language section it works

workspace settings:

{
  "[javascript][javascriptreact][typescript][typescriptreact][vue][json][jsonc][html][css][less][markdown][xml][yaml][svg]": {
      "editor.defaultFormatter": "esbenp.prettier-vscode"
  },
  // with this it works, if something else is set for `[typescript]` in the user settings
  "[typescript]": {
      "editor.defaultFormatter": "esbenp.prettier-vscode"
  }
}

so it seems order is one-language section in workspace > one-language section in user settings > multi-language section in workspace

@ulugbekna
Copy link
Contributor

@sandy081 this is indeed a bug, not a feature request, AFAICT

I also described the bug in #188679

@sandy081 sandy081 added bug Issue identified by VS Code Team member as probable bug and removed feature-request Request for new features or functionality labels Jul 26, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Issue identified by VS Code Team member as probable bug config VS Code configuration, set up issues
Projects
None yet
Development

No branches or pull requests

5 participants