Skip to content

Comments

Add KQL syntax highlighting for kuery code blocks#2677

Merged
theletterf merged 1 commit intomainfrom
kql-syntax-highlighting
Feb 10, 2026
Merged

Add KQL syntax highlighting for kuery code blocks#2677
theletterf merged 1 commit intomainfrom
kql-syntax-highlighting

Conversation

@theletterf
Copy link
Contributor

@theletterf theletterf commented Feb 10, 2026

Summary

  • Add a custom highlight.js language definition for KQL (Kibana Query Language), replacing the previous JSON fallback for kuery code blocks.
  • Register kuery (with kql alias) as a supported language in the server-side language map.
  • Add KQL examples to the custom highlighters test page.

The grammar is based on the KQL Peggy grammar from Kibana and highlights keywords (and, or, not), field names, quoted strings, operators, wildcards, literals, and nested query syntax.

LLM disclosure

This PR was co-authored with Claude (Anthropic). The highlight.js language definition, server-side registration changes, and documentation examples were generated with AI assistance and reviewed by a human.

Made with Cursor

@theletterf theletterf requested review from a team as code owners February 10, 2026 13:13
@theletterf theletterf requested a review from reakaleek February 10, 2026 13:13
@theletterf theletterf self-assigned this Feb 10, 2026
@theletterf theletterf force-pushed the kql-syntax-highlighting branch from 895b404 to 94092ab Compare February 10, 2026 13:16
Replace the JSON fallback for `kuery` code blocks with a dedicated
highlight.js language definition based on the KQL grammar from Kibana.

Co-authored-by: Claude <noreply@anthropic.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
@theletterf theletterf force-pushed the kql-syntax-highlighting branch from 94092ab to 4f4a252 Compare February 10, 2026 13:16
@github-actions
Copy link

🔍 Preview links for changed docs

@theletterf theletterf enabled auto-merge (squash) February 10, 2026 13:25
@theletterf theletterf merged commit 7e7ab39 into main Feb 10, 2026
31 checks passed
@theletterf theletterf deleted the kql-syntax-highlighting branch February 10, 2026 13:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants