Add Separate Grammar for CQL (Cassandra Query Language)
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!
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.
Ok, I will look into it!
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.