feat: add SQL syntax highlighting inside NWScript query strings
This commit is contained in:
@@ -143,6 +143,7 @@ function registerNWScript(monaco: Parameters<OnMount>[1]) {
|
|||||||
],
|
],
|
||||||
|
|
||||||
string: [
|
string: [
|
||||||
|
[/\b(SELECT|FROM|WHERE|INSERT|INTO|VALUES|UPDATE|SET|DELETE|JOIN|LEFT|RIGHT|INNER|OUTER|ON|AND|OR|NOT|IN|IS|NULL|AS|ORDER|BY|GROUP|HAVING|LIMIT|COUNT|SUM|AVG|MAX|MIN|DISTINCT|CREATE|TABLE|ALTER|DROP|INDEX|PRIMARY|KEY|LIKE|BETWEEN)\b/i, "keyword.sql"],
|
||||||
[/[^\\"]+/, "string"],
|
[/[^\\"]+/, "string"],
|
||||||
[/\\./, "string.escape"],
|
[/\\./, "string.escape"],
|
||||||
[/"/, { token: "string.quote", next: "@pop" }],
|
[/"/, { token: "string.quote", next: "@pop" }],
|
||||||
@@ -185,6 +186,7 @@ function defineForgeTheme(monaco: Parameters<OnMount>[1]) {
|
|||||||
{ token: "comment", foreground: "6A9955" },
|
{ token: "comment", foreground: "6A9955" },
|
||||||
{ token: "number", foreground: "B5CEA8" },
|
{ token: "number", foreground: "B5CEA8" },
|
||||||
{ token: "operator", foreground: "D4D4D4" },
|
{ token: "operator", foreground: "D4D4D4" },
|
||||||
|
{ token: "keyword.sql", foreground: "4ec9b0" },
|
||||||
],
|
],
|
||||||
colors: {
|
colors: {
|
||||||
"editor.background": bg,
|
"editor.background": bg,
|
||||||
|
|||||||
Reference in New Issue
Block a user