spectacles / CodeComplice

CodeIntel for Sublime Text 2 / 3
Other
167 stars 18 forks source link

Can't disable codeintel; CodeComplice overrides suggestions of jQuery plugins #22

Closed ghost closed 9 years ago

ghost commented 9 years ago

I just catch the issues, first time when i type $(document).ready and request suggestion, and it provides

$(document).ready(function(e){
     // bla bla
});

Now it only show suggestions of CodeComplice, i just tried to disable CC by "codeintel": false, and "codeintel_live": false but it still not disabled.

spectacles commented 9 years ago

the jQuery plugin: https://github.com/SublimeText/jQuery is providing snippets, not completions. So you have to type the first letter yourself. When you call the popup then, all matching snippets are showing. You can leave CodeComplice active.

http://de.tinypic.com/r/iqvwqr/8

Also in case you don't know: CC offers a jQuery library, which you can use by setting:

"codeintel_language_settings": {
            "JavaScript": {
...
                "codeintel_selected_catalogs": ["jQuery"],
...
            }
}
ghost commented 9 years ago

ok, got it, thank u

spectacles commented 9 years ago

hey @ptcong, please have look at this commit : https://github.com/spectacles/CodeComplice/commit/4b0266e26af4c83cc47d0f8e88c01ee5296a0fd2

I have added a new entry to the jQuery catalog. It's the return value of $.Deferred() .

So if you now have a deferred object, instead of getting function.prototype completions, you will now get a completion for the deferred.then() method (since that is the only method I have added so far :)

Could you be bothered to add the remaining methods, described here:? http://api.jquery.com/category/deferred-object/

Maybe you can apply the same technique to cases similar to this one, such as the Promise object.: http://api.jquery.com/Types/#Promise

Would be awesome to get you involved more!!!!

ghost commented 9 years ago

ok, i will make a pull request when done. But should we add deprecated functions ?

ghost commented 9 years ago

@wizza-smile i added deprecated functions then made a pull request. check it