Since the Geanylua documentation seems to be absent on the web I can't really help you, a normal plugin would use [`document_set_filetype()`](https://www.geany.org/manual/reference/document_8h.html#a7a2f2bfa1c9fe7d9472...) but I don't know if its available in the restricted Geanylua API.
Geanylua being orphaned and unmaintained I'm not sure if the missing documentation problem will get fixed.