Skip to content
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

Support for custom yaml tags (e.g. "!include") #59

Closed
akaRem opened this issue Apr 4, 2018 · 4 comments
Closed

Support for custom yaml tags (e.g. "!include") #59

akaRem opened this issue Apr 4, 2018 · 4 comments

Comments

@akaRem
Copy link

akaRem commented Apr 4, 2018

Hi!

There is an issue in YAML plugin for VS Code redhat-developer/vscode-yaml#76
In short: custom YAML tags such as !include, !vault (and many others) that are used in Ansible, CloudFomation, JenkinsJobBuilder and many other utilities are not supported. But these tags are Language feature (see more details in attached link)

As far as I understand, the problem is somewhere in lang. server. because it's used as backend for mentioned plugin.

Could you please investigate possibilities to implement this in language server, so folks from vscode-yaml will be able to support this in plugin?

@JPinkney
Copy link
Contributor

JPinkney commented Apr 4, 2018

It is because the parser currently does not support custom yaml tags. I'm looking into a parser that supports both custom yaml tags and comments right now for this issue and redhat-developer/vscode-yaml#75.

@ArsLucidum
Copy link

@JPinkney Hi!

Have you been able to find any parser that can potentially add those features and replace the current one?

My company is right now developing a yaml-based language for some private needs, and we'd need support for !include tags as well as possibly comments. We're considering using this server and contributing to it, so we'd appreciate it if you can share what you've managed to investigate so far :)

@JPinkney
Copy link
Contributor

@kace91 Right now the best candidate by far is https://github.com/eemeli/yaml. It has a really expressive AST and has tests against all of YAML 1.2 spec.

My only concern is that at the top of the AST readme it says this: "Does practically no error checking, and should never throw -- but if you feed it garbage, you'll likely get a garbage AST as well". That seems to be the only drawback I can find. One thing we would need to check is how this would effect the results shown to the user etc.

@JPinkney
Copy link
Contributor

Added in 0.0.12 release!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants