Support drift sqlite syntax
Drift is a persistence library for Dart bases on SQLite. It has introduced some modifications/extensions to the basic SQLite syntax for better code generation. See drift_files.
Would it be possible to support this syntax? Would be great to use the VSCode extension to format drift files. If you'd consider adding support I'd be happy to try and work on a PR.
Well... nothing against supporting a new dialect.
One one hand, it should be fairly easy to just extend the current SQLite dialect to add the : operator to deal with label: syntax. That would at least make the formatter not crash.
Unfortunately, this will conflict with the :name placeholder syntax as they both contain the : character. For example, when the tokenizer sees text like query:select it's hard for it to distinguish whether this should be query: label followed by select keyword, or query identifier followed by :select placeholder.
At the moment I don't really have a good idea of how to solve this conflict. It touches on some of the fundamental problems the formatter has - mainly, that it doesn't properly parse the SQL. I'm working on a longer-term solution, which involves writing a new SQL parser that I could use in the formatter. But that project is still in early stages.