ternjs / tern_for_vim

Tern plugin for Vim
MIT License
1.83k stars 100 forks source link

libs not loaded #104

Closed yjlintw closed 9 years ago

yjlintw commented 9 years ago

the TernDef, autocomplete works, but when I create a .tern-project file and try to load the jquery definition, nothing happened.

My directory is like this

the tern-project is under the root folder

and my .tern-project file looks like this

{
    "libs": [
        "jquery"
    ],

    "plugins": {
    }
}
marijnh commented 9 years ago

When you say 'nothing happens', do you mean Tern stops working entirely, or do the jQuery completions not work? You should probably also include the browser definitions, since jQuery uses those. Other than that, I don't know what could be happening, and would need more information to be able to say anything useful.

yjlintw commented 9 years ago

Only the jQuery completions doesn't work. When you said include the browser definitions, does that means I should add "browser" in the "libs" field? I tried and made the .tern-project file like this but the jQuery completions are still not working.

{
    "libs": [
        "browser",
        "jquery"
    ],

    "plugins": {
    }
}
marijnh commented 9 years ago

Can you give a concrete example of a file where you'd expect a completion but aren't getting one?

yjlintw commented 9 years ago

For example

$(document).rea

should see ready shows up, but it does not.

screen shot 2015-09-03 at 11 50 47 pm
yjlintw commented 9 years ago

It turns out that I have some settings in my .vimrc prevent tern_for_vim to work properly. It works properly after I remove those settings.

Related URL

marijnh commented 9 years ago

Oh, that's odd. Thanks for the update.