angelozerr / tern.jsduck

Tern Plugin for ExtJS, CKEditor
MIT License
9 stars 3 forks source link

ExtJS 6.0.2 support #14

Closed j-christ closed 7 years ago

j-christ commented 7 years ago

Hello,

I'm having trouble getting extjs 6.0.2 autocomplete working in emacs. I'm using tern.jsduck in my attempt. I've added the task to generate 6.0.2 plugin based on the 5.1.1 plugin.

Steps:

0) cd extjs/6.0.2 1) jsduck --verbose --output ~/tmp/6.0.2/ classic/classic/src/ packages/core/src/ --ignore-global --export=full --encoding=iso-8859-1 2) mv ~/tmp/6.0.2 to tern.jsduck/api/extjs 3) cd tern.jsduck 4) grunt template

This produces a extjs_6.0.2.js file in plugin.

When I move this to ~/.emacs/tern/plugin, and attempt autocomplete in emacs it does not work. E.g.

Ext.define('my.foo',{
    extend: 'Ext.Base'
    });

and then type something like "auto" in the config block passed to the define, I get no autocomplete suggestions.

UPDATE I've also tried using the 5.1.1 plugin from https://github.com/angelozerr/tern.jsduck/blob/master/plugin/extjs_5.1.1.js and I still don't get any completion suggestions for "auto" with the query:

{
    "files": [{"name": "obj.js", "type": "full", "text": "Ext.define('my.foo',{\nextend: 'Ext.Base',\nauto"}],
    "query": {"type": "completions", "end": {"line": 2, "ch": 4}, "file": "obj.js"}
}

So, what am I doing wrong? is tern.jsduck not working with the current version of tern, or do I have a misconfiguration?