[Geany-Users] Adding a filetype

Colomban Wendling lists.ban at xxxxx
Wed Jan 27 14:04:47 UTC 2016

Le 27/01/2016 14:32, Alain Aupeix a écrit :
> Le 27/01/2016 12:32, Lex Trotman a écrit :
>> On 27 January 2016 at 21:23, Alain Aupeix <alain.aupeix at wanadoo.fr> wrote:
>>> Hi,
>>> New user of geany (v0.21 under Ubuntu 12.04) , I tried to add a language.
>>> I  started using filetypes.c and adding *.prg to C extensions.
>>> It works.
>>> I then now tried to add a new filetype in filetype_extentions.conf, and
>>> to rename filetypes.c to filetypes.harbour
>> You need to read the manual section on adding custom filetypes.
> Well, I was reading the documentation, and find that for custom
> filetypes, the naming convention isn't the same.
> I have renamed it filetypes.harbour.conf
> But thats always not ok.

Does it mean you don't see the new language in the "File type" list in
the UI, or that it's not automatically applied to your .prg files?

If the new file tyep doesn't appear at all, it probably means the file
is in the wrong place/has wrong permissions.

If it's not detected automatically, it might be because names are case
sensitive.  if your filetype is named "filetypes.harbour.conf", your
entry in filetype_extensions.conf need to mention "harbour" exactly.

If you get the proper filetype yet no syntax highlighting or anything,
it's probably that you failed to set the lexer_filetype under stettings
in your custom filetype.  Custom filetypes have additional keys you need
to fill in.  (BTW, you probably also want to fill in tag_parser).


More information about the Users mailing list