Does state.languageDataAt("commentTokens", 0) return anything in an editor with this language? Also, have you verified that your dependency tree is deduplicated and isn’t loading any library package twice?
When I log out state.languageDataAt("commentTokens", 0), it shows that it’s an empty array.
As far as the dependency duplcation–I had 6.6.0 and 6.0.0 referenced in various parts of my yarn.lock file. I downgraded the 6.6.0 to 6.0.0 (so now I only see 6.0.0 for the language package), but I still see the same output. From what I can tell, I only have a single version of the language package installed (there is only a single entry in my yarn.lock file and in my node_modules folder).
Should I be managing dependencies in a particular way with codemirror packges? Do I need to provide custom resolutions or anything like that?
When you clear your package lock and fully recreate it, npm is pretty good about deduplicating the whole tree and installing up-to-date packages. Any other operation that upgrades packages seems to risk creating weird duplications.
Interesting–I saw that in the docs when trying to solve this but I wasn’t sure how to use that. Is this something I should be doing as an extension of creating my NodeSet (via NodeProp.add)? I had originally assumed that passing the facet in to Language() would attach the facet to the top node for me, but it appears that I need to do that myself?
Yes, you do need to do that (since a Language doesn’t know how to change a Parser). Passing in the prop, either with add or as a two-element array holding the node prop and the facet, when creating the node type should help.