yaml-language-server
yaml-language-server copied to clipboard
Code completion interactions with the Pulumi YAML LSP server
Hey folks! First I want to say, awesome work on schematizing and providing great completions for YAML documents. It's a great extension.
Background
The Pulumi team is working on an LSP server for our domain specific language, Pulumi YAML, for which static shipped schemas are not the right approach. For context, each YAML program can use multiple resource providers at distinct versions, each of which supports returning its own schema. Our Azure schemas weigh around 100MiB for each version, and that's just one provider!
Accordingly, we've been investing in an LSP server catering to our language & our simple expression language.
What's not working
When a user has both the Red Hat YAML and Pulumi YAML LSP extensions installed, code completions misbehave - double completing or editing the document in "incorrect" ways.
Solutions
I think if we could exclude "Pulumi.yaml" files from your LSP server's activations, or have the Red Hat plugin not serve files if it detects (I am unsure how) that the Pulumi YAML LSP is active for Pulumi.yaml files we might resolve the issue.
Are you shipping yaml-language-server as part of your solution?
Are you shipping
yaml-language-serveras part of your solution?
Nope, but lots of us have both installed.
what is the language identifier for pulumi.yaml? If it is YAML, at least vscode will activate it. we do list * .yaml files but I suspect even without us listing the file extension vscode would wake this LSP through language identifier.
It's YAML. We're hoping to keep the general language support for YAML, we just get LSP server conflicts. My understanding is that changing the language identifier will disable all language specific plugins (because it will be a different language).
What kind of conflicts do you get? Is there a schema associated somehow with pulumi files. If that is the case, you can try to set it to a dummy schema using the extension API.
@gorkem there is not a fixed schema for Pulumi YAML, as the valid properties for a YAML program depend on the providers (values) used, and are dynamic.
We would want a way to prevent the Red Hat YAML language server from trying to offer completions for Pulumi.yaml files in particular.