jsctags icon indicating copy to clipboard operation
jsctags copied to clipboard

Does not generate output for Backbone Models

Open bitboxer opened this issue 11 years ago • 6 comments

It would be nice if it also respects the Backbone way of using Javascript:

var HelloModel = Backbone.Model.extend({

  world: function() {
    console.log("Hello World!");
  }

});

currently it only returns [] for this.

bitboxer avatar Sep 28 '13 09:09 bitboxer

:+1: I really need this work! The extend method of defining classes is becoming common in many frameworks. At the very least, is there an option to surface all functions that are properties on unnamed JS objects? That would at least get world to show up as a tag in tern's output.

Any ideas? @ramitos?

tybenz avatar Oct 03 '14 00:10 tybenz

Same for anonymous (+self-executing) functions:

(function () {
    ....
}());

Empty array is returned by jsctags. Note that tern itself seems to be able to parse it, since tern_for_vim plugin commands (such as TernDef, TernDoc, TernRefs) work fine.

laur89 avatar May 04 '15 09:05 laur89

I just ran into the issue of it not working for anonymous functions. Was really hoping to use this to generate tags for Tagbar.

3cooper avatar May 20 '15 13:05 3cooper

Same issue here. Hope that it can be fixed.

kawing-chiu avatar Jun 05 '15 08:06 kawing-chiu

I'm also wishing for this :+1:

nerfologist avatar Jun 19 '15 09:06 nerfologist

Ampersand.js (a backbone-inspired JS framework) also uses this pattern. +1

zeorin avatar Sep 30 '15 21:09 zeorin