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: [
|
||||
[/\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.escape"],
|
||||
[/"/, { token: "string.quote", next: "@pop" }],
|
||||
@@ -185,6 +186,7 @@ function defineForgeTheme(monaco: Parameters<OnMount>[1]) {
|
||||
{ token: "comment", foreground: "6A9955" },
|
||||
{ token: "number", foreground: "B5CEA8" },
|
||||
{ token: "operator", foreground: "D4D4D4" },
|
||||
{ token: "keyword.sql", foreground: "4ec9b0" },
|
||||
],
|
||||
colors: {
|
||||
"editor.background": bg,
|
||||
|
||||
Reference in New Issue
Block a user