-
Notifications
You must be signed in to change notification settings - Fork 589
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[JavaScript] Add SQL embedding (#4094)
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.
- Loading branch information
Showing
6 changed files
with
160 additions
and
0 deletions.
There are no files selected for viewing
14 changes: 14 additions & 0 deletions
14
JavaScript/Embeddings/SQL (for JS template).sublime-syntax
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
%YAML 1.2 | ||
--- | ||
# http://www.sublimetext.com/docs/syntax.html | ||
# highlight tagged template strings | ||
scope: source.sql.js-template | ||
version: 1 | ||
hidden: true | ||
|
||
extends: Packages/SQL/SQL.sublime-syntax | ||
|
||
contexts: | ||
prototype: | ||
- meta_prepend: true | ||
- include: scope:source.js#text-interpolations |
14 changes: 14 additions & 0 deletions
14
JavaScript/Embeddings/SQL (for TS template).sublime-syntax
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
%YAML 1.2 | ||
--- | ||
# http://www.sublimetext.com/docs/syntax.html | ||
# highlight tagged template strings | ||
scope: source.sql.ts-template | ||
version: 1 | ||
hidden: true | ||
|
||
extends: Packages/SQL/SQL.sublime-syntax | ||
|
||
contexts: | ||
prototype: | ||
- meta_prepend: true | ||
- include: scope:source.ts#text-interpolations |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters