To me it doesn't sound too difficult so I'll try to do it myself once this PR is merged. But of course on the way I can realize it's not so easy as I imagine and may decide it's not worth it.
@LiquidCake I just tried this in
https://github.com/techee/geany/commit/534a655da7fb64190b2c2ab5d16f1790116dd...
Maybe I'm overlooking something but IMO it's as simple as that. Could you have a look at it and give it a try?