prql-vscode icon indicating copy to clipboard operation
prql-vscode copied to clipboard

Syntax highlighting is incorrect with # in an alias name

Open richb-hanover opened this issue 1 year ago • 1 comments
trafficstars

Creating an alias that contains a "#" gives an incorrect coloring in the VSCode Extension. The generated SQL is OK. Using the example below:

from albums
derive `foo#` = 5

In the Playground, the syntax coloring looks OK and the SQL is too.

In the VSCode Extension, the SQL is OK, but the highlighting shows the "#` = 5" to be grey and italicized.

image

Moved here from: https://github.com/PRQL/prql/issues/4725

richb-hanover avatar Jul 13 '24 21:07 richb-hanover

This would be great to fix. It's probably not a trivial fix given the code grammar is in TextMate, but also not impossible — rust does manage:

image

max-sixty avatar Jul 13 '24 22:07 max-sixty

what should it look like?

here's my VSCode extension to help with authoring TextMate grammars https://marketplace.visualstudio.com/items?itemName=RedCMD.tmlanguage-syntax-highlighter

RedCMD avatar Aug 15 '25 23:08 RedCMD