I am trying to use CM with lezer grammar for lua language (custom simplified syntax).
But syntax highlighting is not working in any trial
using CM 6.0.1, lezer grammar and generator
Console is showing this error:
index.js?02d1:1823 CodeMirror plugin crashed: TypeError: Cannot read properties of undefined (reading 'set')
at HighlightStyle.style (index.js?5a84:233:1)
at highlightTags (index.js?5a84:249:1)
at HighlightBuilder.highlightRange (index.js?5a84:297:1)
at HighlightBuilder.highlightRange (index.js?5a84:342:1)
at highlightTree (index.js?5a84:267:1)
at TreeHighlighter.buildDeco (index.js?caa4:1666:26)
at new TreeHighlighter (index.js?caa4:1648:1)
at ViewPlugin.eval [as create] (index.js?02d1:1877:1)
at PluginInstance.update (index.js?02d1:1896:1)
at new EditorView (index.js?02d1:6295:1)
editor is created from vue3 app in custom component using this code:
mounted() {
var view = new EditorView({
doc: this.doc,
extensions: [
edSetup,
syntaxHighlighting(luaHighlightStyle),
luaLanguage(),
autocompletion({ override: [(ctx) => luaCompletions(ctx, this.variables)] }),
],
parent: document.getElementById(this.idComponent)!
});
}
edSetup is copied from basicSetup as mentioned in comment, all lines containing “highlight” are commented
please help, what i am doing bad, I can provie more code.
thank you very much
Jan