ikatyang / tree-sitter-yaml

YAML grammar for tree-sitter
https://ikatyang.github.io/tree-sitter-yaml/
MIT License
94 stars 38 forks source link

Highlight scripts in multiline comments #47

Open pinpox opened 1 year ago

pinpox commented 1 year ago

Hey, is there a way to syntax-highlitht scripts in multi-line comments? E.g. I have yaml files like this:

- foo:
  - bar: [ "baz" ]
- this:
  - |
    #!/bin/sh
    echo "test" $(var)
    cat /dev/null

And would ilke the string to be highlighted with bash highlighting. I think this is referred to as injected or fenced languages in tree-sitter (reference)