ternjs / tern_for_sublime

Sublime Text package adding Tern support
MIT License
803 stars 54 forks source link

Can not use dollar sign prefix for functions #1

Closed subhaze closed 11 years ago

subhaze commented 11 years ago

If you use a $ to prefix functions the completion will not complete just leaving you with the $

Example:

{
  "!name": "mylibrary",
  "!def": {
    "point": {
      "x": "number",
      "y": "number"
    }
  },
  "$MyConstructor": {
    "!type": "fn(arg: string)",
    "staticFunction": "fn() -> bool",
    "prototype": {
      "property": "[number]",
      "clone": "fn() -> +MyConstructor",
      "getPoint": "fn(i: number) -> point"
    }
  },
  "MyConstructor": {
    "!type": "fn(arg: string)",
    "staticFunction": "fn() -> bool",
    "prototype": {
      "property": "[number]",
      "clone": "fn() -> +MyConstructor",
      "getPoint": "fn(i: number) -> point"
    }
  },
  "someOtherGlobal": "string"
}

In the above example MyCon will correctly completed to MyConstructor, however, $MyCon will complete to $

subhaze commented 11 years ago

All seems to be well now, patched here https://github.com/marijnh/tern_for_sublime/commit/51d24eded8a81968c4dc124a3d6a1515fbb9a3f1