Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature Request: Detect dialect inside a comment or filename #764

Open
kermes opened this issue Aug 6, 2024 · 0 comments
Open

Feature Request: Detect dialect inside a comment or filename #764

kermes opened this issue Aug 6, 2024 · 0 comments
Labels

Comments

@kermes
Copy link

kermes commented Aug 6, 2024

Describe the Feature
just like the /* sql-formatter-disable */ feature, would love to be able to specify the dialect inside a comment before the query.
Maybe something like /* sql-formatter-dialect: postgresql */ in the first line of the file.

Why do you want this feature?
Specially in vscode extension, where one project can have multiple dialects in different files but you're currently forced to choose one only for the whole project in the extension settings

Alternative
Another solution could be to identify the dialect in the filename, so myquery.snowflake.sql or even myquery.postgresql could be used to pick the correct dialect.

@kermes kermes added the feature label Aug 6, 2024
@kermes kermes changed the title Feature Request: Detect dialec inside a comment Feature Request: Detect dialect inside a comment Aug 6, 2024
@kermes kermes changed the title Feature Request: Detect dialect inside a comment Feature Request: Detect dialect inside a comment or filename Aug 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant