The `sh` parser was swapped to the ctags parser from the Geany one.
`function` and other keywords are actually only keywords at the start of a command (for bash and zsh at least). But the ctags `sh` parser is pretty simple and does not track start of command. Detecting command start might not be simple since they can be embedded.
That said there are some changes around `function` in the ctags parser that are newer than the one in Geany, but not sure if they will help.
@techee maybe add `sh` to the list of parsers that need to be updated, especially to get the excellent work of @b4n ;-)