Ok, you can do it if you extend your own Geanylua. And since its unowned, why not :)
You C cod is passing a string as the filetype, it should be a pointer to the filetype structure, use [`filetypes_lookup_by_name()`](https://www.geany.org/manual/reference/filetypes_8h.html#aa2a53fa0c2f4362d9a...) to get it from the string.