I spend a lot of my day job working with Typescript and Web Components (specifically lit.dev), which leads to a lot of code blocks using nested languages within template literals (example).
Treesitter is fantastic at identifying the languages involved, and can automatically infer the necessary syntax highlighting, etc. However, I can’t find any way to allow the LSP to interact, and thus lose Cmp support, syntax error highlighting, etc.
I’ve tried manually starting the LSP, however I think that because the filetype of the overall buffer doesn’t match, it won’t attach. Is there any way I can have LSP kick in for just the tagged literals, to get native CSS language support in my
css literals and HTML language support inside the
I’ve tried doing some googling, but most results are either a) irrelevant, b) reddit-blackout-ed, or c) both. Thanks!