Skip to content

[SQL] Add default SQL syntax selector command #4279

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

deathaxe
Copy link
Collaborator

@deathaxe deathaxe commented May 30, 2025

This PR adds a naive command for users to choose default SQL dialect to be assigned to source.sql.

grafik

The sql_set_default_syntax basically works for any syntax, but is prefixed sql_ as it is located in and dedicated to SQL syntax package.

Alternatively a general purpose set_default_syntax could be implemented by ST core or Default package.

Ideally, dialect syntaxes could be identified by attributes in Syntax() class, but until this becomes true, rely on a static list of files specified via dialect_file argument to choose from.

FWIW, Right now SQL seems to be the only use case for what is called a "dialect".

This commit adds a naive command for users to choose default SQL dialect
to be assigned to `source.sql`.

The `sql_set_default_syntax` basically works for any syntax, but is prefixed
`sql_` as it is located in and dedicated to SQL syntax package.

Alternatively a general purpose `set_default_syntax` could be implemented
by ST core or Default package.

Ideally, dialect syntaxes could be identified by attributes in `Syntax()` class,
but until this becomes true, rely on a static list of files specified via
`dialect_file` argument to choose from.
@deathaxe deathaxe force-pushed the pr/sql/add-dialect-chooser branch from 2f27ffd to 01634dd Compare May 30, 2025 15:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants