KeyQL Syntax Highlighting

A Visual Studio Code extension for Microsoft's Keyword Query Language (KeyQL / KQL) — syntax highlighting plus a document formatter.

Download keql-syntax-0.1.0.vsix

Version 0.1.0 · ~11 KB · requires VS Code 1.60 or newer · MIT licensed

Install it

From a terminal:

code --install-extension keql-syntax-0.1.0.vsix

Or from inside VS Code:

  1. Open the Extensions view (Cmd/Ctrl+Shift+X).
  2. Click the … menu at the top of the panel.
  3. Choose Install from VSIX… and pick the downloaded file.
  4. Reload VS Code, then open any .keql or .kql file.

What it highlights

The color scheme mirrors SQL, so it looks familiar in whatever theme you already use.

ElementExample
Logical operatorsAND OR NOT
Proximity / rankingNEAR ONEAR XRANK WORDS
Property namesauthor: filetype: size
Comparison operators: = <> < > <= >=
Quoted phrases"exact phrase"
Numbers and dates1024 2026-01-01
Booleanstrue false
Wildcardsreport*
Comments// …

Formatting

Run Format Document to normalize operator casing and spacing and break grouped expressions onto indented lines:

(author:"Jane" OR author:"John") AND NOT filetype:pdf

becomes

(
    author:"Jane"
    OR author:"John"
)
AND NOT filetype:pdf

To format on save, add "[keql]": { "editor.formatOnSave": true } to your settings.