Hi, I’m trying to add a custom mixed expression language (yet another one) and I’m having trouble inheriting autocompletion from my wrapped language.
I tried to reproduce it with htmlParser and jsParser and I run into the same problem. What am I missing?
Here is the reproducible environment: CodeMirror 6 / TypeScript (duplicated) - StackBlitz
Use javascriptLanguage.parser instead of the raw parser from @lezer/javascript. The latter has no link at all to the code from @codemirror/lang-javascript so those extensions won’t activate in its syntax trees, as you found.
javascriptLanguage.parser
@lezer/javascript
@codemirror/lang-javascript
thank you, that fixes the issue. Also javascript().language.parser does the job, but I guess the former is preferred to avoid instancing until needed.
javascript().language.parser