How to enable folding for LESS-files and save the foldings?
Hi,
I've created a LESS-file (it's a compiler for css-files). Unlinke PHP-files, I have no foldings. But when I click on the brackets, phpstorm is marking them. How I can enable foldings and save them?
Please sign in to leave a comment.
Hi Peter,
It is not yet implemented (it has to be done separately for each supported language/format) -- please watch/vote/comment etc : http://youtrack.jetbrains.net/issue/RUBY-8930?projectKey=RUBY
However, you can use custom folding right now (TBH, have not tested if it will remember it after restart):
It's not ideal (as you cannot quickly see what was folded) but at least something.
Is it posible to define, that phpstorm treats LESS files exactly like CSS files? The CSS-file treatment works very well, already. And if so: how I can exactly do that? :)
Changed
Maybe it will be better to rename a file to *.css in this case?
In any case: try File | Settings | File Types -- move pattern from "LESS files" to "Cascading style sheets" (but you will loose all LESS-specific features, of course)
Sorry, I use PhpStorm 3 and I have no "File" > "Settings". "File" yes, but no "Settings". Please see my attached screenshot, for this matter.

File | Settings is for Windows/Linux.
For Mac -- I guess (since I'm not a Mac user) it should be PhpStorm | Preferences
OK, thanks. I'm on a Mac. At "Preferences" > "File Types" I've associated LESS-files to CSS and it looks good. The functionality is enchanced and I have good enough folding functionality.
The solution is good, but not perfect. I'm keen on the developments, which will improve LESS functionality. :)
RubyMine is the "home project" fort LESS, SASS & CoffeeScript.
Take a look at filed feature requets/bugs http://youtrack.jetbrains.net/issues/RUBY?q=%23Unresolved+less
Please also note that lot of changes are made in upcoming branch 112 (corresponds to PS/WS 3.5)
http://blog.jetbrains.com/ruby/2012/01/rubymine-4-0-beta-is-available-for-download/