LESS CSS Compiler

Compatible with all products except MPS
180 376

Watches directories for changes to LESS files and compiles changed files to CSS.

Supports LESS 1.6.0.

Features: Recursive directory monitoring

When a LESS file in a watched directory (or one of its subdirectories) is modified and saved, it is automatically compiled to CSS and copied to the same relative path in one or more output directories.

@import dependency resolution

Files that @import a modified LESS file are also recompiled automatically.

Include / exclude files by pattern

Prevent specific LESS files from being compiled by specifying include / exclude patterns (glob) that match against filename, folder name, or any part of the complete path to the LESS file.

Move, copy, and delete detection

When a LESS file is moved, copied, or deleted, the plugin will offer to perform the same operation on the corresponding CSS file(s).

Virtual filesystem notification

Unlike other solutions, this plugin is smart enough to notify IntelliJ when CSS files are changed, moved, copied, or deleted. In most cases, updated CSS files will be immediately reflected in the editor and Project tree view.

Selective compilation

If the plugin somehow fails to catch changes to a LESS file, simply right-click anywhere in the editor or Project tree and select "Compile to CSS". You can also compile an entire directory by right-clicking on it in the Project tree.

Error notifications

Any errors encountered during the compilation process will produce an error notification balloon in the IDE containing a link to the file and the line number that caused the error.


Screenshots are available at the LESS CSS Compiler page on the IntelliJ Plugin Repository website.

Source Code:

GitHub project


NOTE: This plugin is ONLY compatible with IntelliJ IDEA 11+, PhpStorm 5+, and WebStorm 5+. It should also be compatible with RubyMine 4.5+, but has not been tested.

Download plugin

Recent change notes

  • [bugfix] Fixed #43 - Compile multiple profiles
  • [bugfix] Fixed #42, #49, and #61 - More robust profile settings persistence
  • [enhancement] Added form validation to project settings
  • [bugfix] Upgraded to LESS 1.6.0 and fixed JavaScript errors in less.js 1.6.0
  • [bugfix] Issue #53 - Downgraded to LESS 1.5.0 to fix JavaScript errors in less.js 1.6.0
  • [enhancement] Issue #53 - LESS 1.6.0
  • [enhancement] Issue #58 - Added setting to disable automatic compilation on save (for those who prefer to compile manually)
  • [bugfix] Fixed to run under IntelliJ 13
  • [enhancement] Added "Compile to CSS" action for community edition
  • [bugfix] Fixed #39 - Upgraded LESS from version 1.3.1 to 1.3.3
  • [bugfix] Fixed #38 - UTF-8 support
  • [enhancement] Faster compiles with Rhino optimizations enabled
  • [bugfix] Fixed #25 - Multiple notifications for the same file
  • [enhancement] Issue #4 - Hide previous error notifications for the same file
  • [enhancement] Issue #27 - Clean up Notifier logging
  • [enhancement] Issue #28 - Move UI messages to external properties files
  • [bugfix] Fixed #26 - VFS refresh doesn't work when CSS files don't already exist
  • [enhancement] Issue #20 - Disable all "Reset prompts" buttons
  • [enhancement] Issue #22 - Rename notification groups
  • [bugfix] Fixed #23 - Thread safety when saving / compiling
  • [enhancement] Issue #19 - Alert user if no CSS output directories are specified when "Compile to CSS" action is invoked
  • [enhancement] Issue #9 - Respect //simpless:!minify and //simpless:minify per-file
  • [enhancement] Issue #6 - Optional .less extension support for @imports
  • [enhancement] Issue #24 - Show progress while compiling
  • [enhancement] Major code refactoring and cleanup
  • [enhancement] Added PhpStorm and WebStorm support
  • [enhancement] Updated README.md and plugin.xml
  • [enhancement] Issue #11 - Add include / exclude pattern support
  • [bugfix] Fixed #14 - Commit changed LESS files to disk before compiling
  • [bugfix] Fixed #17 - Problems with spaces in path name
  • [enhancement] Updated README.md and plugin.xml
  • [enhancement] Issue #10 - Move, Copy, and Delete support
  • [enhancement] Improved notifications and event logging
  • [bugfix] Fixed #13 / #12 - java.io.IOException thrown for Windows file paths
  • [enhancement] Added icon to "Compile to CSS" Action in context menu
  • [enhancement] Issue #5 - Make CSS output directories more user friendly in preference pane
  • [enhancement] Issue #2 - Add "Compile to CSS" Action to context menu for .less files
  • [bugfix] Fixed #1 - Incorrect line number for errors when using imports
  • [enhancement] @import support
  • [enhancement] Don't output empty CSS files
  • [bugfix] Fixed MethodNotFoundException
This plugin fails when attempting to use @import with remote .less files on an https:// server. I get the same JavaIO file not found error as others have reported. I've removed spaces from all of my directories and still am getting this error. Everything works fine when I use all local directories. We use a hosted .less file which imports into our projects so that we can update them remotely. We need this functionality to be enabled.
It creates multiple processes and they are very slow, as compared to the speed of "lessc" for the same file. http://screencast.com/t/HghSV8kB
Proposal: url for image file if you need to generate a stylesheet url(../image.png) generate as url(image.png) The ability to select only one file to generate the remaining ignore @import Sorry for my English
It plugin crashes IDE
Hi, just found out that less compiler does not work properly when using extend() with variable. For example: .@{se-css-prefix}-heading { color: @se-content-header-color; border: 1px solid @se-border-color; .border-radius(); } .@{se-css-prefix}-filter-bar1 { &:extend(.@{se-css-prefix}-heading); } .@{se-css-prefix}-filter-bar2 { &:extend(.@{se-css-prefix}-heading); } when used like this the extend are not parsed.
I have installed the plugin in the preferences area. It appears in the list of plugins. But there is no new "LESS compiler" section appearing in the preferences menu. I have restarted PHPStorm a couple times. I'm using PHPStorm 8.0.1 on Mac.
Whith PHPStorm 8 java.lang.reflect. InvocationTargetException
Found a bug: "@import (reference)" compiles the referenced files into the CSS
I too am getting the error: LESS CSS Compiler Error ...No such file... ...(line -1, column -1)... I managed to fix this by renaming the containing folder and removing the spaces, but I'm wondering if there will be an update soon to fix this issue so that I can use proper names for my folders on my local machine. Also, I was wondering if an update to 1.7.* was in the works.
I am also getting the error: LESS CSS Compiler Error ...No such file... ...(line -1, column -1)... Seems to be since I upgraded to PHPstorm 7.1.3. You can get around it by right clicking and taking the compile to CSS option and it will compile cleanly. We need a bug fix as it is very irritating.
If you're getting the "java.io.IOException: No such file file" error check your path for whitespaces. I.E. change "C:\Users\p.ishwar.baradur\Desktop\Mint files\Parts\less" to "C:\Users\p.ishwar.baradur\Desktop\Mintfiles\Parts\less" Would be really nice to see this fixed. I prefer to have spaces in my directory names for readability and see no reason why this should be a problem for this plugin.
I am getting the same problem as anonymous (2014-04-11) LESS CSS Compiler Error ...No such file... ...(line -1, column -1)... Please advise what we are doing wrong, thank you!
I am getting the below error LESS CSS Compiler Error parts.less: org.mozilla.javascript.UniqueTag@b9b6e3: NOT_FOUND Error: java.io.IOException: No such file file:/C:/Users/p.ishwar.baradur/Desktop/Mint%20files/Parts/less/_variables.less (line -1, column -1) I dont know why its searching under file:/C etc. Even though i have mentioned path as "C:\Users\p.ishwar.baradur\Desktop\Mint files\Parts\less".. Kindly help.
Doesn't support automatic data-uri() convertation to base64. It is supported by less since 1.4.0, you say you support less 1.6.0 but don't support this feature.
Does not work for me. When I`m trying to add LESS profile from project settings I`m facing the following problems: 1. CSS Source path has to be absolute or relative to user`s home. This makes project settings unportable 2. I can not add CSS output directory - clicking '+' sign just does nothing (same as '...' sign for less source directory). So I cannot just save profile to try the plugin.
Please  sign in  to leave a comment.