Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

*.less syntax highlighting in Geany

Is there any way to add syntax highlighting for *.less files in Geany? I found that using *.css syntax higlighting, sugessted somewhere in the internet is not enough for me, and in fact it making bloody mess from any more complicated *.less stylesheet.

I really like Geany, so changing IDE is not an option.

Thanks in advance!

like image 419
Gniewomir Świechowski Avatar asked Jan 20 '26 05:01

Gniewomir Świechowski


2 Answers

I would suggest you to write your own highlighting.

In this case you should edit file filetype_extensions.conf, create a file filetype.less (see other filetypes for examples, preferably those similar to .less - like .css) and maybe play around with filetype.conf.

On the other hand, if you never work with .css files, you could just edit corresponding configuration files to set up the highlighting you would enjoy.

If this is still not enough, you may have take another editor (with designed highlighting for .less files), see how the highlighting is organised there and then reproduce it with geany.

This may be overcomplicated solution, though I don't insist it's the only one.

like image 106
Eugene B Avatar answered Jan 23 '26 05:01

Eugene B


On Geany menu: Tools -> Configurations Files -> filetype_extensions.conf

Change:

CSS=*.css;

With:

CSS=*.css;*.scss;*.less;

And your *.less file will be highlighted enough to start to work

like image 36
jedi Avatar answered Jan 23 '26 06:01

jedi



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!