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 YAML-TMLanguage #224

Open
scripthunter7 opened this issue Jan 19, 2024 · 0 comments
Open

Support for YAML-TMLanguage #224

scripthunter7 opened this issue Jan 19, 2024 · 0 comments

Comments

@scripthunter7
Copy link

scripthunter7 commented Jan 19, 2024

Currently, this library can natively parse TMLanguage from JSON and PLIST formats.

I suggest extending these "natively supported" formats with YAML.

YAML is a convenient format for creating TMLanguage because:

  • compact (no unnecessary curly brackets or tags)
  • supports comments (useful for complicated regexps, for example)
  • complicated regexps can be formatted to multiple lines, which helps improve readability

For example, GitHub Linguist also supports YAML-TMLanguage natively or TypeScript TMLanguage written in YAML

A possible (and the most simple) solution could be to use the js-yaml parser, although I'm not sure about this, since as I can see this library does not use external dependencies

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

No branches or pull requests

1 participant