Skip to content
| Marketplace
Sign in
Visual Studio Code>Programming Languages>KQL ToolNew to Visual Studio Code? Get it now.
KQL Tool

KQL Tool

fangweij

|
7 installs
| (0) | Free
Provides syntax highlighting, customized snippets, and automatic formatting for Kusto Query Language (KQL) in VS Code
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

KQL Tool README

This extension provides syntax highlighting, code snippets, and formatting for KQL (Kusto Query Language)

1. Add the following snippet to your settings.json (Syntax Highlight)

"editor.tokenColorCustomizations": {
  "textMateRules": [
    {
      "scope": "variable.system.kql",
      "settings": {
        "foreground": "#7FDBFF",
        "fontStyle": "bold"
      }
    },
    {
      "scope": "keyword.logical.kql",
      "settings": {
        "foreground": "#d22020",
        "fontStyle": "bold"
      }
    },
    {
      "scope": "keyword.clause.kql",
      "settings": {
        "foreground": "#887fff",
        "fontStyle": "bold"
      }
    },
    {
      "scope": "keyword.operator.symbol.kql",
      "settings": {
        "foreground": "#ef25ce",
        "fontStyle": "bold"
      }
    },
    {
      "scope": "variable.other.kql",
      "settings": {
        "foreground": "#FFA07A"
      }
    },
    {
      "scope": "builtin.function.kql",
      "settings": {
        "foreground": "#DDA0DD"
      }
    },
    {
      "scope": "keyword.define.kql",
      "settings": {
        "foreground": "#90EE90",
        "fontStyle": "bold"
      }
    },
    {
      "scope": "keyword.flowcontrol.kql",
      "settings": {
        "foreground": "#3d31ec",
        "fontStyle": "bold"
      }
    },
    {
      "scope": "keyword.query.kql",
      "settings": {
        "foreground": "#FFD580"
      }
    },
    {
      "scope": "type.data.kql",
      "settings": {
        "foreground": "#B0E0E6"
      }
    },
    {
      "scope": "constant.numeric.kql",
      "settings": {
        "foreground": "#87CEFA"
      }
    },
    {
      "scope": "comment.singleline.kql, comment.block.kql",
      "settings": {
        "foreground": "#A9A9A9",
        "fontStyle": "italic"
      }
    },
    {
      "scope": "string.doublequote.kql, string.singlequote.kql",
      "settings": {
        "foreground": "#66FF66",
        "fontStyle": "bold"
      }
    },
    {
      "scope": "string.verbatim.doublequote.kql, string.verbatim.singlequote.kql",
      "settings": {
        "foreground": "#228B22"
      }
    }
  ]
},

2. Add the below snippet to your settings.json (Autoformat on save)

"[kql]": {
  "editor.formatOnSave": true,
  "editor.defaultFormatter": "fangweij.kql-tools-vscode"
},

3. Code Snippets

I created severval customized code snippets => try typing "inv"

  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
© 2025 Microsoft