Highlight CTE aliases as variable instead of type#42
Conversation
|
We require contributors to sign our Contributor License Agreement, and we don't have @owensilk on file. You can sign our CLA at https://zed.dev/cla. Once you've signed, post a comment here that says '@cla-bot check'. |
|
@cla-bot check |
|
We require contributors to sign our Contributor License Agreement, and we don't have @owensilk on file. You can sign our CLA at https://zed.dev/cla. Once you've signed, post a comment here that says '@cla-bot check'. |
|
The cla-bot has been summoned, and re-checked this pull request! |
|
Hey, thanks for this! Did you sign the CLA yet? Our API indicates you did not, although I can see your attempts above. Happy to help if needed. Thanks! |
|
@cla-bot check |
|
We require contributors to sign our Contributor License Agreement, and we don't have @owensilk on file. You can sign our CLA at https://zed.dev/cla. Once you've signed, post a comment here that says '@cla-bot check'. |
|
The cla-bot has been summoned, and re-checked this pull request! |
|
@cla-bot check |
|
The cla-bot has been summoned, and re-checked this pull request! |
|
Definitely looks like a reasonable improvement and fix, do you perhaps have a before/after as screenshots to compare this? |
Problem
CTE (Common Table Expression) names in SQL are currently highlighted as
@type(line 4 ofhighlights.scm):This causes CTE aliases (e.g.
my_cteinWITH my_cte AS (...)) to be coloured the same as actual type references like table names and data types. CTE names are aliases, not types — they should be visually distinct.Fix
Change the capture from
@typeto@variable, which is consistent with howterm aliasis already handled on line 27:Both CTE names and column/expression aliases serve the same semantic role (user-defined aliases), so they should share the same highlight group.
Before / After
@type(same color as table references)@variable(same as other aliases)