frigus02 / vscode-sql-tagged-template-literals

VS Code extension, which enables syntax highlighting for SQL in template literals tagged with an `sql` function
https://marketplace.visualstudio.com/items?itemName=frigus02.vscode-sql-tagged-template-literals
MIT License
34 stars 8 forks source link

Support `pg` tempalte literal #25

Open davibe opened 1 year ago

davibe commented 1 year ago

I am working on a project that's using pg instead of sql. Any chance this could be accomodated ? or even configurable ?

frigus02 commented 1 year ago

Hi. I don't think the name for syntax highlighting can be made configurable. It's part of a regex in the grammar file, e.g. look for sql|sqlFragment in:

https://github.com/frigus02/vscode-sql-tagged-template-literals/blob/54882397fd17767b41bcddfa112b0c7d877df81f/extension-syntax-only/syntaxes/grammar.json#L8

It's definitely possible to add more aliases here. We can change it to sql|sqlFragment|pq. I'm kinda hesitant to maintain a potentially long list of names here. Maybe it's fine, though. Hm.

justjake commented 8 months ago

We're using the following names at Notion:

Would love to support more of these. At least the ones i've picked all match \w{0,3}sql\w{0,3} although i think adding more |literl|literal2 might be the better move