For the DSL I have developed, I wanted to have Geany support it as it does the embedded languages like java and C#. I created filetypes.myLang.conf and added the configuration fields as in the manual. For the filed [settings] I added : lexer_filetype=C Now everything seems fine. My language comes in the list in Geany and the syntax is highlighted based on the keywords defined in primary and secondary fields in the config file. My question is, should I add a lexer file for my language or setting it as I've done is ok. If the answer is yes, could someone explain to me how this is done. Also, what's the meaning of this field?
There is no real answer as it is up to you and your language definition whether C syntax is ok or not ;)
The option is configuring, which already existing lexer is used for your filetype. So which magic for highlight and recognize e.g. commands and options is used.
If you really want to create a lexer from scratch or maybe by change some already existent, you can start to read the hacking-documentation. Also I would recommend to check Scintilla as there are some lexer Geany is not shipping as well as new lexers are only accepted, when they are also going upstream (to Scintilla)