Open shackra opened 4 years ago
This might be relevant: https://tree-sitter.github.io/tree-sitter/using-parsers#multi-language-documents
Anyone know how to do this?
"Just" need to tell tree-sitter to switch from js to html inside of
html``
html`<h1>hello</h1>`
Heres a vscode thing that does it. https://marketplace.visualstudio.com/items?itemName=runem.lit-plugin
@yyoncho noted that in Emacs sometimes a mapping of major mode and language is not as straightforward as
N -> 1
, but ratherN -> N
, that is to say that some major modes have to handle different languages at once, like web-mode which handles HTML, CSS, TypeScript, JavaScript and so on.Thus, is required that emacs-tree-sitter handles this kind of edge cases gracefully.