Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Javascript reference and Intellisense in Visual Studio 2013 .coffee files

Just started using Web Essentials and love its support of .coffee files. Big problem however: In Visual Studio, if you add the following reference to the top of a .js file, Visual Studio will include intellisense for the items in the referenced file:

/// <reference path="../../js/knockout-3.1.js" />

So, while writing my code I can type something like ko. and intellisense shows me all the functions knockout has to offer.

However the above XML reference is not allowed in .coffee files and in fact keeps them from being compiled. I can put the following in a .coffee file:

# @reference ../../js/knockout-3.1.js

This will compile but I lose the intellisense in Visual Studio.

How can I "include" other .js files as a reference and trigger intellisense in a .coffee file?

like image 536
skrile Avatar asked Nov 20 '14 15:11

skrile


People also ask

How do I create a JavaScript file using Visual Studio code?

With your project open in Visual Studio, right-click on a folder or your project node in Solution Explorer (right pane), and choose Add > New Item. In the New File dialog box, under the General category, choose the file type that you want to add, such as JavaScript File, and then choose Open.

What is reference tag in JavaScript?

The “reference” comment allows you to “see” functions and objects outside of your current file in the completion list.


1 Answers

This is not currently supported.

See this stack overflow question: CoffeeScript Intellisense

Also see this suggestion from web essentials: https://webessentials.uservoice.com/forums/140520-general/suggestions/3782958-coffeescript-intellisense

like image 63
SKYWALKR Avatar answered Oct 16 '22 19:10

SKYWALKR