You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi! I stumbled into a small issue. I think I'm best off showing how to reproduce it:
file1.js:
function A() { this.num = 1; }
file2.js:
var instance = new A();
now at file1.js:
instance.
provides no completion options even though :TernDef finds correct declaration in file2.js, and from there :TernDef finds function A() correctly in file1.js. After I have restarted vim (and thus tern server) with "loadEagerly": "*.js" completion in file1.js works as supposed to. Without loadEagerly this doesn't happen even if I open both files.
After reloading, completion on instance works until I change function A(). After that autocompletion can't find changed contents of instance anymore, which, I think, is understandable since it's now a different object.
So what I'm basically asking is if there is some way to "refresh" all files in the project for tern? Only relation between these files is that they happen to be in the same folder, so no require()-magic or anything like that.
The text was updated successfully, but these errors were encountered:
Currently, killall node is the way to force a full reload. I wasn't able to reproduce this problem. The kind of circular dependency (file 1 using an instance from file 2 of a constructor it itself defines) is sort of rare, but theoretically, it should work (the new value for variable A should propagate to the new in file 2, and thus update the type of the object in instance). Are you using the current (git) version of Tern? There were some fixes to the mechanism that refreshes variables a few months ago.
Hi! I stumbled into a small issue. I think I'm best off showing how to reproduce it:
file1.js:
file2.js:
now at file1.js:
provides no completion options even though :TernDef finds correct declaration in file2.js, and from there :TernDef finds function
A()
correctly in file1.js. After I have restarted vim (and thus tern server) with"loadEagerly": "*.js"
completion in file1.js works as supposed to. WithoutloadEagerly
this doesn't happen even if I open both files.After reloading, completion on
instance
works until I change functionA()
. After that autocompletion can't find changed contents ofinstance
anymore, which, I think, is understandable since it's now a different object.So what I'm basically asking is if there is some way to "refresh" all files in the project for tern? Only relation between these files is that they happen to be in the same folder, so no require()-magic or anything like that.
The text was updated successfully, but these errors were encountered: