Skip to content

Add GROQ highlighting model#5940

Merged
nightwing merged 1 commit into
ajaxorg:masterfrom
rexxars:feat/add-groq-highlighting
Apr 21, 2026
Merged

Add GROQ highlighting model#5940
nightwing merged 1 commit into
ajaxorg:masterfrom
rexxars:feat/add-groq-highlighting

Conversation

@rexxars
Copy link
Copy Markdown
Contributor

@rexxars rexxars commented Apr 8, 2026

Issue #, if available:
N/A

Description of changes:
Adds a new syntax highlighting mode for GROQ (Graph-Relational Object Queries), a query language used by the Sanity content platform, amongst others.

It is getting quite popular - it's a little hard to see the full extent of the ecosystem - but a search for the Sanity clients' .fetch() is a fairly good indicator.

The mode includes highlighting for:

  • Line comments (//)
  • Single and double-quoted strings with escape sequences
  • Numeric literals (integer, decimal, scientific notation)
  • Boolean and null literals
  • Keyword operators (in, match, asc, desc)
  • Built-in functions (count, select, coalesce, defined, order, etc.)
  • Namespaced function calls (string::split, pt::text, etc.)
  • Parameter variables ($name)
  • Special variables (@, ^)
  • Operators: dereference (->), spread (...), range (..), pipe (|), arrow (=>)
  • Comparison and logical operators
  • Brace matching, auto-outdent, and C-style code folding

Pull Request Checklist:

Open kitchen-sink @ 09e8558aae17cd8c21326df71f90796c85a52bb6

@github-actions
Copy link
Copy Markdown

github-actions Bot commented Apr 8, 2026

One of the public type files has been updated, plase make sure there are no backwards incompatible changes done in the PR.

@rexxars rexxars force-pushed the feat/add-groq-highlighting branch from 0782b0e to 09e8558 Compare April 16, 2026 04:48
@github-actions
Copy link
Copy Markdown

One of the public type files has been updated, plase make sure there are no backwards incompatible changes done in the PR.

@rexxars
Copy link
Copy Markdown
Contributor Author

rexxars commented Apr 16, 2026

I saw there was a lint issue - fixed and force-pushed, sorry about that - should have caught that earlier.

@codecov
Copy link
Copy Markdown

codecov Bot commented Apr 16, 2026

Codecov Report

❌ Patch coverage is 99.32432% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 93.72%. Comparing base (a467a6c) to head (09e8558).
⚠️ Report is 1 commits behind head on master.

Files with missing lines Patch % Lines
src/mode/groq.js 96.77% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #5940      +/-   ##
==========================================
- Coverage   93.72%   93.72%   -0.01%     
==========================================
  Files         634      636       +2     
  Lines      137322   137470     +148     
  Branches    14469    14464       -5     
==========================================
+ Hits       128708   128844     +136     
- Misses       8614     8626      +12     
Flag Coverage Δ
unittests 93.72% <99.32%> (-0.01%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@nightwing nightwing merged commit c89c0d5 into ajaxorg:master Apr 21, 2026
5 checks passed
@nightwing
Copy link
Copy Markdown
Member

Thanks, merged.

@rexxars rexxars deleted the feat/add-groq-highlighting branch April 21, 2026 20:35
@rexxars
Copy link
Copy Markdown
Contributor Author

rexxars commented Apr 21, 2026

Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants