Colin Bacon, web developer.

Get Intellisense in SASS/LESS files in Visual Studio

Get Intellisense in SASS/LESS files in Visual Studio

We all love intellisense. No one likes to type more than four characters without Visual Studio doing the rest for you. When using a CSS pre-processor such as SASS or LESS, we may have variables or mixins that we use in different files. This often results in the horrible validation error squiggly line, and no one likes to see that. We can get around this though, and here's how.

Simply reference

The solution is very simple and has been available for .js files for some time. We use a reference comment at the top of our file.

/// <reference path="my-mixins.less" />

Now I can get lovely intellisense in my file on any mixins in my-mixins.less, and those squiggly lines will disappear.

Just reference all the files that you need at the top and you're done. This works for both LESS and SASS files.