Open RedCMD opened 2 months ago
"scripts": { "watch": "tsc -watch -p ./" },
workaround is to place a semicolon ; at the start:
;
I've created a small extension to embed ShellScript into package.json "scripts" https://marketplace.visualstudio.com/items?itemName=RedCMD.json-embedded-languages however, this ShellScript doesn't like being included directly after a double quote "
package.json
"scripts"
"
from having a quick look, it seems to be as simple as adding " OR \\G OR "\\G to (?<=^|;|\\||&|!|\\(|\\{|\\`) under "normal_statement" https://github.com/jeff-hykin/better-shell-syntax/blob/02b319d961f1396b35981139d38c572134806cb5/autogenerated/shell.tmLanguage.json#L1805 I've added a \\G if need be https://github.com/RedCMD/JSON-Embedded-Languages/blob/51b633515b0f7721bfd763cd8dc2c37e35f5a4a1/syntaxes/package.json.tmLanguage.json#L59-L62
\\G
"\\G
(?<=^|;|\\||&|!|\\(|\\{|\\`)
"normal_statement"
Also... because its embedded in JSON, all double quotes " need to be escaped \" not sure how easy it'll be to address; without simply just supplying a secondary grammar I have something basic working, prob should add backtick-interpolation aswell https://github.com/RedCMD/JSON-Embedded-Languages/commit/dc073598cf17df6ba31a3b9ffe4d6623d78f4ab6
\"
The \G might not break anything (AKA it might be okay)
I think " would break things.
As for escapes... yeah I think that would require a second grammar
The code with a problem is:
It looks like:
It should look like:
workaround is to place a semicolon
;
at the start:Context
I've created a small extension to embed ShellScript into
package.json
"scripts"
https://marketplace.visualstudio.com/items?itemName=RedCMD.json-embedded-languages however, this ShellScript doesn't like being included directly after a double quote"
from having a quick look, it seems to be as simple as adding
"
OR\\G
OR"\\G
to(?<=^|;|\\||&|!|\\(|\\{|\\`)
under"normal_statement"
https://github.com/jeff-hykin/better-shell-syntax/blob/02b319d961f1396b35981139d38c572134806cb5/autogenerated/shell.tmLanguage.json#L1805 I've added a\\G
if need be https://github.com/RedCMD/JSON-Embedded-Languages/blob/51b633515b0f7721bfd763cd8dc2c37e35f5a4a1/syntaxes/package.json.tmLanguage.json#L59-L62Also... because its embedded in JSON, all double quotes
"
need to be escaped\"
not sure how easy it'll be to address; without simply just supplying a secondary grammar I have something basic working, prob should add backtick-interpolation aswell https://github.com/RedCMD/JSON-Embedded-Languages/commit/dc073598cf17df6ba31a3b9ffe4d6623d78f4ab6