From 80ea95024e6cca91767b433d8d5b9dbb7dc2b32e Mon Sep 17 00:00:00 2001 From: Murphy Randle Date: Fri, 10 May 2024 14:19:56 -0400 Subject: [PATCH 1/2] Add support for rescript as an injected place --- package.json | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/package.json b/package.json index 1117803..59306d5 100644 --- a/package.json +++ b/package.json @@ -61,6 +61,7 @@ "source.svelte", "source.sql", "source.css", + "source.rescript", "text.html" ], "scopeName": "inline.es6-css", @@ -80,6 +81,7 @@ "source.vue", "source.svelte", "source.sql", + "source.rescript", "text.html" ], "scopeName": "inline.es6-glsl", @@ -99,6 +101,7 @@ "source.vue", "source.svelte", "source.sql", + "source.rescript", "text.html" ], "scopeName": "inline.es6-xml", @@ -118,6 +121,7 @@ "source.vue", "source.svelte", "source.sql", + "source.rescript", "text.html" ], "scopeName": "inline.es6-js-injection", @@ -150,6 +154,7 @@ "source.vue", "source.svelte", "source.sql", + "source.rescript", "text.html" ], "scopeName": "inline.es6-sql", @@ -169,6 +174,7 @@ "source.vue", "source.svelte", "source.sql", + "source.rescript", "text.html" ], "scopeName": "inline.es6-javascript", From b8f51210b53ce64e789949d4be33b7ecb42cf177 Mon Sep 17 00:00:00 2001 From: Murphy Randle Date: Fri, 10 May 2024 15:00:53 -0400 Subject: [PATCH 2/2] Add support for highlighting within rescript files --- package.json | 13 +++++++------ syntaxes/es6-inline-css.json | 5 +++-- syntaxes/es6-inline-glsl.json | 5 +++-- syntaxes/es6-inline-html.json | 5 +++-- syntaxes/es6-inline-javascript.json | 7 ++++--- syntaxes/es6-inline-sql.json | 5 +++-- syntaxes/es6-inline-xml.json | 5 +++-- syntaxes/es6-js-injection.json | 5 +++-- 8 files changed, 29 insertions(+), 21 deletions(-) diff --git a/package.json b/package.json index 59306d5..ae87b4e 100644 --- a/package.json +++ b/package.json @@ -61,7 +61,7 @@ "source.svelte", "source.sql", "source.css", - "source.rescript", + "source.rescript", "text.html" ], "scopeName": "inline.es6-css", @@ -81,7 +81,7 @@ "source.vue", "source.svelte", "source.sql", - "source.rescript", + "source.rescript", "text.html" ], "scopeName": "inline.es6-glsl", @@ -101,7 +101,7 @@ "source.vue", "source.svelte", "source.sql", - "source.rescript", + "source.rescript", "text.html" ], "scopeName": "inline.es6-xml", @@ -121,7 +121,7 @@ "source.vue", "source.svelte", "source.sql", - "source.rescript", + "source.rescript", "text.html" ], "scopeName": "inline.es6-js-injection", @@ -138,6 +138,7 @@ "source.vue", "source.svelte", "source.sql", + "source.rescript", "text.html" ], "scopeName": "inline.es6-html", @@ -154,7 +155,7 @@ "source.vue", "source.svelte", "source.sql", - "source.rescript", + "source.rescript", "text.html" ], "scopeName": "inline.es6-sql", @@ -174,7 +175,7 @@ "source.vue", "source.svelte", "source.sql", - "source.rescript", + "source.rescript", "text.html" ], "scopeName": "inline.es6-javascript", diff --git a/syntaxes/es6-inline-css.json b/syntaxes/es6-inline-css.json index 3a192ef..f667165 100644 --- a/syntaxes/es6-inline-css.json +++ b/syntaxes/es6-inline-css.json @@ -7,9 +7,10 @@ "html", "vue", "svelte", - "php" + "php", + "res" ], - "injectionSelector": "L:source.js -comment -string, L:source.js -comment -string, L:source.jsx -comment -string, L:source.js.jsx -comment -string, L:source.ts -comment -string, L:source.tsx -comment -string", + "injectionSelector": "L:source.js -comment -string, L:source.js -comment -string, L:source.jsx -comment -string, L:source.js.jsx -comment -string, L:source.ts -comment -string, L:source.tsx -comment -string, L:source.rescript -comment -string, L:source.vue -comment -string, L:source.svelte -comment -string, L:source.php -comment -string, L:source.rescript -comment -string", "injections": { "L:source": { "patterns": [ diff --git a/syntaxes/es6-inline-glsl.json b/syntaxes/es6-inline-glsl.json index e19fef3..d8d3cb5 100644 --- a/syntaxes/es6-inline-glsl.json +++ b/syntaxes/es6-inline-glsl.json @@ -7,9 +7,10 @@ "html", "vue", "svelte", - "php" + "php", + "res" ], - "injectionSelector": "L:source.js -comment -string, L:source.js -comment -string, L:source.jsx -comment -string, L:source.js.jsx -comment -string, L:source.ts -comment -string, L:source.tsx -comment -string", + "injectionSelector": "L:source.js -comment -string, L:source.js -comment -string, L:source.jsx -comment -string, L:source.js.jsx -comment -string, L:source.ts -comment -string, L:source.tsx -comment -string, L:source.rescript -comment -string", "injections": { "L:source": { "patterns": [ diff --git a/syntaxes/es6-inline-html.json b/syntaxes/es6-inline-html.json index c8096c5..260a439 100644 --- a/syntaxes/es6-inline-html.json +++ b/syntaxes/es6-inline-html.json @@ -7,9 +7,10 @@ "html", "vue", "svelte", - "php" + "php", + "res" ], - "injectionSelector": "L:source.js -comment -string, L:source.js -comment -string, L:source.jsx -comment -string, L:source.js.jsx -comment -string, L:source.ts -comment -string, L:source.tsx -comment -string", + "injectionSelector": "L:source.js -comment -string, L:source.js -comment -string, L:source.jsx -comment -string, L:source.js.jsx -comment -string, L:source.ts -comment -string, L:source.tsx -comment -string, L:source.rescript -comment -string", "injections": { "L:source": { "patterns": [ diff --git a/syntaxes/es6-inline-javascript.json b/syntaxes/es6-inline-javascript.json index 949ff9c..5495c8a 100644 --- a/syntaxes/es6-inline-javascript.json +++ b/syntaxes/es6-inline-javascript.json @@ -7,9 +7,10 @@ "html", "vue", "svelte", - "php" + "php", + "res" ], - "injectionSelector": "L:source.js -comment -string, L:source.js -comment -string, L:source.jsx -comment -string, L:source.js.jsx -comment -string, L:source.ts -comment -string, L:source.tsx -comment -string", + "injectionSelector": "L:source.js -comment -string, L:source.js -comment -string, L:source.jsx -comment -string, L:source.js.jsx -comment -string, L:source.ts -comment -string, L:source.tsx -comment -string, L:source.rescript -comment -string", "injections": { "L:source": { "patterns": [ @@ -109,4 +110,4 @@ } ], "scopeName": "inline.es6-javascript" -} \ No newline at end of file +} diff --git a/syntaxes/es6-inline-sql.json b/syntaxes/es6-inline-sql.json index c5a70dc..36ed13d 100644 --- a/syntaxes/es6-inline-sql.json +++ b/syntaxes/es6-inline-sql.json @@ -7,9 +7,10 @@ "html", "vue", "svelte", - "php" + "php", + "res" ], - "injectionSelector": "L:source.js -comment -string, L:source.jsx -comment -string, L:source.js.jsx -comment -string, L:source.ts -comment -string, L:source.tsx -comment -string", + "injectionSelector": "L:source.js -comment -string, L:source.jsx -comment -string, L:source.js.jsx -comment -string, L:source.ts -comment -string, L:source.tsx -comment -string, L:source.rescript -comment -string", "injections": { "L:source": { "patterns": [ diff --git a/syntaxes/es6-inline-xml.json b/syntaxes/es6-inline-xml.json index 07db220..faa86de 100644 --- a/syntaxes/es6-inline-xml.json +++ b/syntaxes/es6-inline-xml.json @@ -7,9 +7,10 @@ "html", "vue", "svelte", - "php" + "php", + "res" ], - "injectionSelector": "L:source.js -comment -string, L:source.js -comment -string, L:source.jsx -comment -string, L:source.js.jsx -comment -string, L:source.ts -comment -string, L:source.tsx -comment -string", + "injectionSelector": "L:source.js -comment -string, L:source.js -comment -string, L:source.jsx -comment -string, L:source.js.jsx -comment -string, L:source.ts -comment -string, L:source.tsx -comment -string, L:source.rescript -comment -string", "injections": { "L:source": { "patterns": [ diff --git a/syntaxes/es6-js-injection.json b/syntaxes/es6-js-injection.json index 236d398..ebb646b 100644 --- a/syntaxes/es6-js-injection.json +++ b/syntaxes/es6-js-injection.json @@ -7,9 +7,10 @@ "html", "vue", "svelte", - "php" + "php", + "res" ], - "injectionSelector": "L:source.js (string.quoted.double.html, string.quoted.single.html), L:source.jsx (string.quoted.double.html, string.quoted.single.html), L:source.js.jsx (string.quoted.double.html, string.quoted.single.html), L:source.ts (string.quoted.double.html, string.quoted.single.html), L:source.tsx (string.quoted.double.html, string.quoted.single.html)", + "injectionSelector": "L:source.js (string.quoted.double.html, string.quoted.single.html), L:source.jsx (string.quoted.double.html, string.quoted.single.html), L:source.js.jsx (string.quoted.double.html, string.quoted.single.html), L:source.ts (string.quoted.double.html, string.quoted.single.html), L:source.tsx (string.quoted.double.html, string.quoted.single.html), L:source.rescript -comment -string", "patterns": [ { "include": "source.ts#template-substitution-element"