-
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
[JavaScript] Add SQL embedding #4094
Conversation
de64f66
to
9c72659
Compare
Does the SQL bump to version 2 then require a bunch of other "host" syntaxes to bump, too? |
It requires the bump of the Embeddings syntaxes. For example, Curiously, |
It turns out my local set-up includes #3046, which also bumps to version 2. Sounds good to me. |
Only inherited syntaxes need to be of same version. It is no problem to include or embed a v2 into a v1 or vice versa. Bumping SQL to v2 and adding support for SQL in tagged template strings however are 2 distinct steps. The more interesting question is what effect #3046 will have in combination with this one as JS is embedded, extended and used in nearly all template syntaxes. I wonder when we hit context sanity limits again. :D |
With regards to #4035, any purley embedded syntax should be named Syntaxes in Embedding are currently not correctly named by accident. |
9c72659
to
c7732df
Compare
Should I move the first commit out into a separate PR?
Fixed. |
c7732df
to
72d69b9
Compare
I'd say yes. Bumping SQL version is a seperate PR. Actually I don't see any reason for it, at the moment. It would be part of merging #3046. |
Well, it is a prerequisite for this, since the embedding syntaxes inherit from the SQL one. So unless we want to wait with this PR for #3046 – but it has already been open for years – I have moved the SQL change to #4097. |
This is useful for server-side JS. Especially using one of the following libraries: https://github.com/felixfbecker/node-sql-template-strings https://github.com/blakeembrey/sql-template-tag https://github.com/XeCycle/pg-template-tag Using `version: 1` for the Embedding syntaxes since they need to match the inherited `SQL.sublime-syntax`. It does not currently handle interpolation inside SQL strings.
72d69b9
to
435eb33
Compare
[XML]
.This is useful for server-side JS.
Especially using one of the following libraries:
https://github.com/felixfbecker/node-sql-template-strings
https://github.com/blakeembrey/sql-template-tag
https://github.com/XeCycle/pg-template-tag
Using
version: 1
for the Embedding syntaxes since they need to match the inheritedSQL.sublime-syntax
.It does not currently handle interpolation inside SQL strings.
The SQL template is detected but the SQL syntax highlighting is not performed (source.sql.embedded.js
is the deepest scope anything within the template string gets).Edit: If I change
extends: Packages/SQL/SQL.sublime-syntax
toCSS.sublime-syntax
inSQL (JS template).sublime-syntax
, it highlights as CSS correctly.Edit2 It was caused by a differing version.