Formatters - managing Grafana queries in separate files

Hello there, I am managing the SQL queries of my dashboards in separate files, so that I can use my own IDE, review changes easily etc. And I would like to format those files, but all formatters break when encountering grafana variables, specifically something like array_contains(array(${FRUIT:sqlstring}), fruit).

So my question would be, what cli formatters are there that do work and what exactly is grafana using in their Web UI.

Thank you a lot for any help!