-
Notifications
You must be signed in to change notification settings - Fork 2
Open
Labels
Description
myCodeMirror.on("keyup", function (cm, event) {
if (instance.state.completionActive) {
return;
}
var cur = instance.getCursor();
var token = instance.getTokenAt(cur);
var string = '';
if (token.string.match(/^[.`\w@]\w*$/)) {
string = token.string;
}
if (string.length > 0) {
CodeMirror.commands.autocomplete(instance);
}
});
grab lodash API method list and implement hint function.
Useful links:
https://stackoverflow.com/questions/26174164/auto-complete-with-codemirrror
https://stackoverflow.com/questions/13744176/codemirror-autocomplete-after-any-keyup
https://codemirror.net/demo/complete.html
https://github.com/codemirror/CodeMirror/blob/master/demo/complete.html