Rasmus
Rasmus

Reputation: 4180

Add syntax highlighting to .less-files in NetBeans

I want to have files with a .less extension use the CSS syntax highlighting in NetBeans, and I don't have any clue how to do this.

I found a rather time consuming way to do this (http://netbeans.dzone.com/tips/quickstart-guide-language-supp), but it hit me that it must be easier way to do this.

Anyone knows?

Upvotes: 27

Views: 14293

Answers (5)

Hermes
Hermes

Reputation: 838

You might try out the new version of the plugin that was already mentioned:
http://plugins.netbeans.org/plugin/41315/lesscss-module

GitHub repository, now gone, was available at:
https://github.com/khairie/lesscss-module

For me it seems to work quite fine despite some minor bugs in coloring. It is missing some features and e.g. does not offer automatic formatting, though.

Note that basic editing support for Sassy CSS and LESS CSS preprocessor files has been added to NetBeans dev build:
http://wiki.netbeans.org/NewAndNoteWorthy

Upvotes: 6

R. Oosterholt
R. Oosterholt

Reputation: 8120

Since Netbeans 7.4 less is supported by Netbeans without the need for an additional plugin.

For older version of Netbeans there are two plugins: http://plugins.netbeans.org/plugin/32782/lesscss-module and http://plugins.netbeans.org/plugin/41315/lesscss-module

Upvotes: 1

The SCSS Support plugin also works with less files, just need to add the "less" file extension with text/x-scss MIME in Tools/Options/Miscellaneous/Files.

Upvotes: 3

c33s
c33s

Reputation: 2662

a module which adds full less highlighting support can be downloaded from the following page: http://plugins.netbeans.org/plugin/32782/lesscss-module

i tested the module with netbeans 7.0 and it worked flawless.

Upvotes: 11

Maxence
Maxence

Reputation: 13329

You just have to add a new file type in Netbeans > Tools > Options > Miscellaneous > Files. Note that Netbeans will mark as errors some less features like variables...etc

Upvotes: 23

Related Questions