Make it possible to also use SQL "magic comments" to signify SQL template literals #4
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Thank you for sharing this plugin!
I've been using it (together with https://github.com/un-ts/prettier/tree/master/packages/sql and https://github.com/Sec-ant/prettier-plugin-embed) on a codebase that uses "magic comments" to signal that the string literal that follows is SQL. E.g:
So, I had to adapt your plugin to recognize this pattern of using block comments in addition to using tags. Both continue to work with my modifications in case-insensitive manner - e.g. sql, SQL, Sql, etc all work for both block comments and tags.
I also removed
hi def link sqlTemplateString jsTemplateString
- SQL syntax highlighting looks better without it (I understand this is subjective, but maybe give it a try).Once again, thank you for making this plugin - it made my SQL more colorful, and my day a little brighter.