1

I know there are some answers around, but all incomplete.
Can't get a working .sass syntax highlighting.
I followed all the steps described in the official guide, but no luck.

Steps made:
copied from css file:

# cp /usr/share/geany/filetypes.css ~/.config/geany/filedefs/filetypes.sass.conf

with the needed .sass.conf extension. I've set the

extension=.sass

(at this point in geany Document menu I can already find the new file type "sass file")

I copied and edited filetype_extensions.conf in my ~/.config/geany adding:

SASS=*.sass;

Now, I guess only one thing's missing, the lexer_filetype and/or tag_parser declaration in the former filetypes.sass.conf, but I can't find many informations about this. What are available lexer? I tried with a simple lexer_filetype=css and tag_parser=css but nothing.

Any clue from anyone who managed to run this before?

tonjo
  • 1,394
  • 1
  • 14
  • 27

2 Answers2

3

Most names are case-sensitive. It should work if you use lexer_filetype=CSS. Also, I'm not positive, but you might want to name the file as filetypes.SASS.conf even it's not required (not sure), it's somewhat of a convention for custom filetypes.

Sadly, if you want to find the available lexer filetypes, you'll have to read the source.

Matthew Brush
  • 164
  • 1
  • 1
  • 5
  • Yep, that's a start! Automatically, now, my sass files are recognized. Anyway, having a complete syntax highlighting it's not a simple task, with indentation and all that. I read it can only be done with a plugin, what do you think? – tonjo Oct 23 '13 at 15:43
  • It should mostly work if you use CSS lexer as a base, I don't really know SASS but see https://sourceforge.net/p/scintilla/feature-requests/799. – Matthew Brush Dec 02 '13 at 02:59
  • If you have already opened target files, you have to **`Tools > Reload Configuration`** – jave.web Feb 11 '18 at 17:07
1

geany saves the filetype of an opened file!

If you change the filetype-definitions you must try another file to test your new definitions. Closing and reopening the same file is not enough.

jscs
  • 63,694
  • 13
  • 151
  • 195
Falk
  • 11
  • 1