I'm currently trying to get a CodeMirror editor going with XText 2.25. But since I updated my CodeMirror from 5.51 to 5.59.4 I always get an error that's called when using the autocomplete:
TypeError: identStart is undefined
I was already able to narrow it down to the function "cursorActivity" in "show-hint.js" where CodeMirror tries to set the variable:
var identStart = this.startPos;
if(this.data) {
identStart = this.data.from;
}
This works well when using the editor without XText, but "from" is never set when I'm using XText so it fails. I'm a bit at loss here what I can do. I tried to find out if I can configure XText to set the variable when the validation is called on the XText server but couldn't find anything. I currently create the editor like this:
self.editor = xtext.createEditor({
document: shadowRoot,
xtextLang: self.xtextLang,
sendFullText: true,
syntaxDefinition: mode,
lineNumbers: self.hasLineNumbers,
showCursorWhenSelecting: true,
enableValidationService: true,
textUpdateDelay: self.textUpdateDelay,
gutters: ["CodeMirror-lint-markers"],
extraKeys: {"Ctrl-Space": "autocomplete"},
hintOptions: {
container: widget_container
}
});