0

I've been reading through the documentation and can't figure out how to add items to the completion list for javascript intellisense in VS 2013. I understand that the items can be accessed through event.items, but pushing to this array doesn't seem to affect the completion list.

intellisense.addEventListener('statementcompletion', function (event) {

    var attempt = new Object();
    attempt.name = "helllo";
    attempt.value = function() {console.log("helllooo");
    attempt.kind = "function";
    attemp.scope = "global";

    event.items.push(attempt);
});

1 Answers1

0

Possible values for kind are : 'method', 'field', 'property', 'parameter', 'variable', and 'reserved'.

The following code snippet should work.

intellisense.addEventListener('statementcompletion', function (e) {

    e.items.push({name:'Hello', kind:'method'});

});

Fredy
  • 11
  • 3