TextArea
syntax highlighting for multi-language code
#4746
Replies: 2 comments
-
I think this is probably beyond the scope of what we'd want to offer out of the box, but we should definitely think about how it could be achieved by someone who wishes to add that functionality. tree-sitter offers a mechanism for this: https://tree-sitter.github.io/tree-sitter/using-parsers#multi-language-documents However, it appears that the |
Beta Was this translation helpful? Give feedback.
-
Thanks Darren, I do appreciate this might be out of scope especially if it would require a lot of work! I haven't looked into this in much depth yet, but there's also the feature of language injection which might be useful? I'm not sure if this would still require |
Beta Was this translation helpful? Give feedback.
-
Currently the
TextArea
syntax highlighting works based on a single definedlanguage
, but often code can contain multiple different languages. The obvious example is HTML which can contain JavaScript inside of <script> tags and CSS inside of <style> tags. But also TypeScript syntax highlighting should include the JavaScript as well as the added types.Beta Was this translation helpful? Give feedback.
All reactions