redhat-developer / yaml-language-server

Language Server for YAML Files
MIT License
1.03k stars 249 forks source link

Customize LSP definition #212

Open angelozerr opened 4 years ago

angelozerr commented 4 years ago

By following the great explanation how to contibute with YAML schema I have copied/pasted https://github.com/Azure/vscode-kubernetes-tools/blob/127ec070c8dabd56901ce13ff81bd6f561e4f087/src/yaml-support/yaml-schema.ts#L24 and adapted it for Quarkus. I can manage completion, validation, hover for Quarkus properties in application.yaml:

QuarkusYamlDemo

The missing feature is about definition (hyperlink). I would like to do a Ctrl+Click on name child to open the Java class which defines this property (like we have with application.properties).

It should be fantastic if yaml language server could give this capability.

gorkem commented 4 years ago

The way to add functionality such as this is supporting it through the JSON schema. Of course standard JSON schema spec, does not have anything related but the JSON Schema that YAML LSP is using is JSON Schema with extensions. YAML LS needs a bit of work (#150) before we can consider more extensions but the way to extend YAML LS is to extend the JSON Schema with extensions.

safareli commented 2 years ago

Any updates on this? How can one contribute on this?