Open kentliau opened 10 years ago
could it as simple as just have one more "tern_preload_libs": [ "browser", "jquery" ]
in the Preferences files?
or even better, specify a default .tern-project configuration in the Preferences files
Actually, this is probably best done on the side of the server -- it could read ~/.tern-default-project
when it fails to find a local project config. (Not sure why I did not think of that before.) On windows, I guess that wouldn't work -- no idea what the equivalent would look like there.
I made a pull request for the tern project that include a new parameter when starting the server. this new paramenter --config will accept an encoded json string, i am now figuring how to add more argument in this sublime plugin, it doesn't seem like working even i hard-coded the --config argument
@marijnh I have no idea why I hard-code the --config argument to the tern.py files it still doesn't work.
at line 504
tern_command = ["node", os.path.join(plugin_dir, "node_modules/tern/bin/tern"), "--no-port-file --config '{libs:[\"browser\"]}'"]
PS: I need to sleep now, my great Sunday, will continue later
The arguments passed on the command line should be added as separate strings in the array. So I think this might work:
tern_command = ["node", os.path.join(plugin_dir, "node_modules/tern/bin/tern"), "--no-port-file", "--config" "{libs:[\"browser\"]}"]
That'd be a useful feature, I agree. Want to implement it?