-
Notifications
You must be signed in to change notification settings - Fork 25
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Caret-T: Javascript autocomplete #26
Comments
This is very similar to https://github.com/sevin7676/Ace.Tern/issues/18 This specific Tern extension has a quick hack to enable using the Reference Path tag supported by Visual Studio intellisense (also used by Type Script). You can use this syntax as follows: (must be at top of file, multiple lines allowed)
Also, the reference paths are not checked or updated until you call: This method is a quick hack that is poorly implemented because I'm just using it for something specific. However, Tern supports adding other files for reference by configuring the RequireJS plugin or Node plugin. Example for rqeuireJS: enableTern accepts boolean or configuration options
|
I'm using your Caret-T Chrome application and when I put the reference line at the top of a file, it has no effect on autocomplete. /// Is this feature possible in Caret-T? (I posted the question in this project because Caret-T about box points to this project for getting the source code instead of CaretTern project) |
There is a bug that prevents local paths from working correctly unless they start with I haven't got around to fixing this bug yet. |
Thanks, it works when library and projects files are in seperate folders under the same root. |
Can you update the project source code to include library files in demo.html file as you explain in your first answer to this issue? |
I'm not sure what you referring to: |
In ext-tern.js the following line exists in function loadExplicitVsRefs: editor.ternServer.addDoc(path.replace(/^.*[\\\/]/, ''), xhr.responseText); Can I add my js libraries to be used in autocomplete using this function? |
Thats the code that automatically reads the You can also use: The demo has now been updated with better comments: https://github.com/sevin7676/Ace.Tern/blob/master/demo.html#L108 |
Thank you very much. The following instruction does what I need. editor.ternServer.addDoc(fileName,fileContents) |
Suppose I have file (a.js) with my functions in it.
In file b.js I write code which uses functions in a.js.
Can autocomplete give information about functions in a.js while working in b.js?
The text was updated successfully, but these errors were encountered: