regex - How to get token before dot('.') at current cursor postion in javascript for autocompletion in codemirror editor? -
function (editor, currentpos) { return editor.gettokenat(currentpos); }
i designing code editor custom language. so, want autocompletion based on mode state. want token before .
when press ctrl + space during hello
. then, method should give me hello
can suggest properties related it. how can this?
the javascript-hint addon this, continuing previous token in loop until finds not property. want code looks similar.
Comments
Post a Comment