问题
I know javascript intellisense support trough _referencs.js in vs2012. At this moment, I am using RequireJS in my frontend, but I think I lost auto-completion supporting in javascript since I started using RequireJS.
I found require.intellisense.js from here, but, unfortunatelly failed with it after several hours and tries.
Is there anyone succeeded in getting auto-completion with RequireJS(version 2.1.2) in vs2012?
回答1:
I got Intellisense to work inside RequireJS defined modules by following this Code Project article: http://www.codeproject.com/Articles/460836/Making-the-most-out-of-JavaScript-Intellisense-in
The download code is at this link: https://github.com/chrisprice/PropertyFinder-HTML5/zipball/master The solution that has the working Intellisense is the iPhone solution.
You'll want to download the code referenced in the article and try it out. Between the download code and that article, you should be able to take it from there to implement Intellisense in your own project.
There is a require.intellisense.js file in the source code for the article that is critical to proper operation. I'm not sure who wrote it, but it is different than the one you reference from jrburke.
If you have any follow up questions, I'll be happy to help.
来源:https://stackoverflow.com/questions/14048851/intellisense-auto-completion-with-requirejs-in-visual-studio-2012