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

Unable to format vscode user profile level settings.json file #1206

Open
qupig opened this issue Nov 13, 2024 · 2 comments
Open

Unable to format vscode user profile level settings.json file #1206

qupig opened this issue Nov 13, 2024 · 2 comments
Assignees

Comments

@qupig
Copy link

qupig commented Nov 13, 2024

Describe the bug

Extension 'Deno' is configured as formatter but it cannot format 'JSON with Comments'-files

The denoland.vscode-deno extension is ONLY cannot format the user profile level settings.json file.

But it can format the workspace level settings.json file or the *.jsonc file within the workspace.

This is very strange but I think it might be solved in vscode extensions since Prettier - Code formatter extension works in all files mentioned above.

This is actually consistent with #840, but I think it defines the scope of the issue more clearly here, and the possibility of a fix.

I've also tested adding "editor.formatOnSaveMode": "file" but it has no effect.

Like said in the comment, if you drag that settings.json as a file into vscode to open it works, but not when opening the file directly from entrances within vscode.

NOTE that the Prettier extension works in both cases, so there must be a way around it.

Not supporting formatting of user profile level settings.json file is very inconvenient, for example I cannot set "denoland.vscode-deno" to user level "editor.defaultFormatter" because it does not work in the file itself.
Instead I have to configure "denoland.vscode-deno" individually in each workspace.

I hope someone can investigate and resolve this humble little issue. And I'm perfectly willing to set this to my user level "editor.defaultFormatter" once this issue is resolved.

Versions

vscode: 1.95.2 deno: 2.0.6 extension: 3.42.0

@dogfuntom
Copy link

Also reproducible with keybindings.json a.k.a. workbench.action.openGlobalKeybindingsFile a.k.a. Preferences: Open Keyboard Shortcuts (JSON).

@qupig
Copy link
Author

qupig commented Nov 18, 2024

@dogfuntom Thank you for adding.

I'm assuming user level jsonc config files may all have the same issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants