-
Notifications
You must be signed in to change notification settings - Fork 591
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
[SQL] #
marking temporary table instead starts a comment
#4130
Comments
Which server? Current SQL syntax primarily supports MySQL, which says the following about comments and identifiers:
According to those specs, Same is true for MariaDB |
Looks like MS SQL Server. Maybe explain DefaultSyntaxChooser? |
Can confirm, T-SQL syntax supports hashed identifiers. It is however not released with any ST build, so I assume the report targeting old naive implementation. Anyway, maybe we should considder adding a simplified default syntax chooser so modifying default dialect works out of the box. |
#
marking temporary table instead starts a comment
@aidas-atu There is a pre-release version of syntax highlighting that fixes your issue. SQL has been broken into multiple flavors that have conflicting syntax specs. In this particular case, I think MySQL wants it to be a comment and MS SQL wants it to be a temp table. If you want to use this feature before it releases, you can follow the instructions in the ReadMe of this repo, and then use the T-SQL flavor for your standalone SQL files. To get it embedded into strings in other languages, there are some more steps. Reply if those are needed. |
Note SQL is extended by and embedded in various syntaxes, thus various packages may need to be overridden to avoid errors with regards to "mismatching syntax versions". |
Description of the bug
Normally temp tables in SQL starts # character, and everything after becomes highligted as a comment.
Steps to reproduce
paste these into sublime when highlighting is set to SQL:
1st line after
#
is highlighted as commentExpected behavior
#
character should not be treated as a start of a commnet.Actual behavior
#
character is treated as a start of a comment.Sublime Text build number
4189
Operating system & version
Windows 11 pro
The text was updated successfully, but these errors were encountered: