deephaven / web-client-ui

Deephaven Web Client UI
Apache License 2.0
29 stars 31 forks source link

Single and double quotes get formatted differently in Groovy queries #2236

Open jjbrosnan opened 3 weeks ago

jjbrosnan commented 3 weeks ago

When I write Groovy queries, single-quoted strings are colored yellow. Double-quoted are colored white. This is an issue particularly in docs, where we use double-quoted strings everywhere. In docs, they're formatted yellow. A user who copy/pastes Groovy code into the web IDE will have a tougher time figuring out which text is in a string and which is not.

It would be nice if they were both yellow, even though they're technically different according to the Groovy interpreter.

mattrunyon commented 3 weeks ago

https://github.com/deephaven/web-client-ui/blob/main/packages/console/src/monaco/lang/groovy.ts#L151 is the offending line. If we want both as strings we should remove this clause. If we want both as "deephavenDb" (which doesn't seem to actually colorize anything), we should add single quotes to this clause