Open 0x2CA opened 4 months ago
I believe the behavior for prettier
key in Zed settings.json are correct. I think there are only three valid keys there (allowed
, parser
, plugins
) and Zed does not support configuring prettier via global settings like VSCode. (I could be wrong).
I am able to see the same behavior with .prettierrc
where Zed does not automatically identify it as TOML/JSON and then inject the correct JSON schema for validation/autocomplete.
As a workaround you can switch to using .pettierrc.json
and explicitly define the schema and it works as expected for me.
"$schema": "https://json.schemastore.org/prettierrc.json",
According to the prettier docs there are a bunch of different places prettier look for configuration. Zed should consider adding support for validating that jsonschema in the following:
prettier
key under package.json
and package.yaml
.prettierrc
(can be json or yaml).prettierrc.json
(JSON).prettierrc.yml
, .prettierrc.yaml
(YAML).prettierrc.json5
(JSON5).prettierrc.toml
(TOML)and Zed does not support configuring prettier via global settings like VSCode. (I could be wrong).
It does support them, prettier
as the root key in Zed's settings.json is passed into prettier as its config json (same as package.json would contain).
So in theory we could add a json schema similar to what https://github.com/zed-industries/zed/pull/12792 did, but I have no idea how volatile prettier schema is from version to version.
Check for existing issues
Describe the feature
in settings.json no prettier tips.
in .prettierrc no prettier tips.
If applicable, add mockups / screenshots to help present your vision of the feature
No response