microsoft / typespec

https://typespec.io/
MIT License
4.1k stars 193 forks source link

Schema for tspconfig.yaml to help with authoring in IDE #2049

Open nguerrera opened 1 year ago

nguerrera commented 1 year ago

It would be nice if the user got some basic completion and docs when editing tspconfig.yaml. I am not sure, but it's possible that our extension can provide a schema to the yaml extension.

It would be fun if we defined this schema in TypeSpec and built it into JSON schema in the build process. :)

nguerrera commented 1 year ago

Seems it is possible. See "Mapping a schema in an extension" in https://marketplace.visualstudio.com/items?itemName=redhat.vscode-yaml

markcowl commented 1 year ago
RodgeFu commented 3 months ago

we should be able to do it by registering our schema to json schema store https://www.schemastore.org/json/

more investigation needed for the emitter's config

timotheeguerin commented 6 days ago

I think schema might not be the right solution here, instead of depending on another extension, we already parse the config as ast so we should be able to provide our own autocomplete there as well