LESS CSS Compiler

Compatible with all products except MPS
08.01.2014
178 658

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:

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

Source Code:

GitHub project

Compatibility:

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

Version

Update date

Recent change notes

2.6.9
  • [bugfix] Fixed #43 - Compile multiple profiles
2.6.8
  • [bugfix] Fixed #42, #49, and #61 - More robust profile settings persistence
  • [enhancement] Added form validation to project settings
2.6.7
  • [bugfix] Upgraded to LESS 1.6.0 and fixed JavaScript errors in less.js 1.6.0
2.6.6
  • [bugfix] Issue #53 - Downgraded to LESS 1.5.0 to fix JavaScript errors in less.js 1.6.0
2.6.5
  • [enhancement] Issue #53 - LESS 1.6.0
2.6.4
  • [enhancement] Issue #58 - Added setting to disable automatic compilation on save (for those who prefer to compile manually)
2.6.3
  • [bugfix] Fixed to run under IntelliJ 13
2.6.2
  • [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
2.6.1
  • [enhancement] Faster compiles with Rhino optimizations enabled
2.6.0
  • [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
2.5.5
  • [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
2.5.4
  • [bugfix] Fixed #23 - Thread safety when saving / compiling
2.5.3
  • [enhancement] Issue #19 - Alert user if no CSS output directories are specified when "Compile to CSS" action is invoked
2.5.2
  • [enhancement] Issue #9 - Respect //simpless:!minify and //simpless:minify per-file
2.5.1
  • [enhancement] Issue #6 - Optional .less extension support for @imports
2.5.0
  • [enhancement] Issue #24 - Show progress while compiling
  • [enhancement] Major code refactoring and cleanup
2.4.1
  • [enhancement] Added PhpStorm and WebStorm support
  • [enhancement] Updated README.md and plugin.xml
2.4.0
  • [enhancement] Issue #11 - Add include / exclude pattern support
2.3.3
  • [bugfix] Fixed #14 - Commit changed LESS files to disk before compiling
2.3.2
  • [bugfix] Fixed #17 - Problems with spaces in path name
2.3.1
  • [enhancement] Updated README.md and plugin.xml
2.3.0
  • [enhancement] Issue #10 - Move, Copy, and Delete support
2.2.0
  • [enhancement] Improved notifications and event logging
2.1.2
  • [bugfix] Fixed #13 / #12 - java.io.IOException thrown for Windows file paths
2.1.1
  • [enhancement] Added icon to "Compile to CSS" Action in context menu
2.1.0
  • [enhancement] Issue #5 - Make CSS output directories more user friendly in preference pane
2.0.0
  • [enhancement] Issue #2 - Add "Compile to CSS" Action to context menu for .less files
1.9.5
  • [bugfix] Fixed #1 - Incorrect line number for errors when using imports
1.9.0
  • [enhancement] @import support
1.8.4
  • [enhancement] Don't output empty CSS files
1.8.3
  • [bugfix] Fixed MethodNotFoundException
19.07.2016
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.
17.08.2015
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
16.04.2015
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
02.04.2015
It plugin crashes IDE
16.02.2015
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.
05.11.2014
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.
Anonymous
18.09.2014
Whith PHPStorm 8 java.lang.reflect. InvocationTargetException
Anonymous
13.08.2014
Found a bug: "@import (reference)" compiles the referenced files into the CSS
11.08.2014
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.
28.05.2014
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.
Anonymous
21.05.2014
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.
Anonymous
10.05.2014
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!
Anonymous
11.04.2014
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.
14.03.2014
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.
18.01.2014
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.