linguist icon indicating copy to clipboard operation
linguist copied to clipboard

Add Separate Grammar for CQL (Cassandra Query Language)

Open Akzestia opened this issue 1 month ago • 3 comments

Hey there!

I’d like to suggest adding a dedicated grammar for CQL (Cassandra Query Language) instead of grouping it under SQL.

Right now, cql code blocks are highlighted using the SQL grammar, but CQL syntax is quite different, no joins, different data types, and its own DDL/DML structure. Having a standalone grammar would make syntax highlighting much more accurate.

I’ve been working on native CQL support for the Zed editor via an extension, which currently has around 15k downloads and grows by about 2-3k new installs each month.

It includes:

  • A full CQL 3.4+ grammar
  • Extensions for DataStax HCD
  • Planned ScyllaDB vector search support

Both the grammar and the language server are open source and actively maintained:

Would love to see cql get its own grammar entry to better reflect the language’s syntax. Happy to help or test if needed!

Akzestia avatar Oct 29 '25 13:10 Akzestia

We can only accept TextMate-compatible grammars. If you can find one, feel free to submit a PR to add it. You can find details in the CONTRIBUTING.md file.

lildude avatar Oct 29 '25 15:10 lildude

Ok, I will look into it!

Akzestia avatar Oct 29 '25 15:10 Akzestia

Hi @lildude! After reading through the TextMate docs, I’ll work on porting my existing CQL grammar to a TextMate-compatible format and then open a PR once it’s ready.

Akzestia avatar Oct 29 '25 16:10 Akzestia