VSCode Extension

Overview

The sqry VSCode extension brings the full code graph into your editor. It connects to the sqry LSP server and provides semantic search, relationship navigation, code quality analysis, and code lenses — all without leaving VSCode.


Installation

Install from the Visual Studio Marketplace:

  1. Open the Extensions panel (Ctrl+Shift+X)
  2. Search for sqry
  3. Click Install

Or install from the command line:

code --install-extension verivus.sqry

The extension requires the sqry CLI to be installed and accessible on your PATH. If sqry is installed elsewhere, set the path in settings.


Features

Open the command palette (Ctrl+Shift+P) and run sqry: Search (Ctrl+Alt+S). Type a structured query or plain text — the extension runs it against the index and displays results in a dedicated panel with file links, symbol kinds, and code previews. Results can be filtered by language and kind, sorted by name, file, kind, or line number, and exported as JSON, Markdown, or CSV.

Search history is preserved with MRU recall — the last 20 queries are available for quick re-execution.

Relationship navigation

Right-click any symbol and choose:

Results appear in the sqry results panel with clickable file locations.

Code lenses

When enabled, sqry adds inline annotations above functions showing caller and callee counts. Click the lens to view the full list. Counts are fetched in batch for performance via the sqry/batchCallerCalleeCount LSP endpoint.

Hover integration

Hovering over a symbol shows caller and callee counts in the editor tooltip, giving immediate context about how a function is used without opening a panel.

Problems panel integration

sqry surfaces code quality diagnostics as native VS Code problems:

Quick fixes are available for each diagnostic type — show callers, show cycle path, or navigate to the duplicate.

Call graph visualization

The extension includes a webview for visualizing call graphs and dependency trees. The graph is rendered as SVG with pan, zoom, search, and export support.

Analysis panels

The extension provides four analysis views accessible from the sidebar:

Each panel refreshes when the index is rebuilt and links directly to source locations.

Status bar

The status bar shows index health at a glance — Ready, Stale, Building, No Index, or Error. Click the status item for quick actions like rebuilding or opening settings.

Auto-indexing

The extension automatically rebuilds the index when files are saved (with a 30-second debounce). On workspace open, configure the behavior:

Multi-root workspace support

In multi-root workspaces, each root gets its own index status and targeting. The status bar and analysis panels adapt to show per-root information.

Getting Started walkthrough

First-time users see a 5-step walkthrough: install sqry, build an index, run a search, try a query, and explore CodeLens.


Settings

Configure the extension via VSCode settings (Ctrl+,) or settings.json:

SettingDefaultDescription
sqry.path"sqry"Path to the sqry CLI binary
sqry.limit200Maximum search results
sqry.timeoutMs15000Search timeout in milliseconds
sqry.indexTimeoutMs300000Index build timeout (5 minutes)
sqry.autoIndexOnOpen"prompt"Auto-index behavior: always, prompt, never
sqry.autoIndexOnSavetrueRebuild index on file save (30s debounce)
sqry.codeLens.enabledtrueShow caller/callee count lenses above functions
sqry.codeLens.calleestrueShow callee counts in CodeLens
sqry.diagnostics.enabledtrueShow unused code, cycles, and duplicates in Problems panel
sqry.diagnostics.fadeUnusedtrueFade unused symbols with DiagnosticTag.Unnecessary
sqry.hover.enabledtrueShow caller/callee counts in hover tooltips
sqry.visualization.enabledtrueEnable call graph visualization webview

Example settings.json:

{
  "sqry.path": "/usr/local/bin/sqry",
  "sqry.limit": 500,
  "sqry.codeLens.enabled": true,
  "sqry.autoIndexOnOpen": "always",
  "sqry.autoIndexOnSave": true,
  "sqry.diagnostics.enabled": true
}

Commands

All commands are available from the command palette (Ctrl+Shift+P):

CommandShortcutDescription
sqry: SearchCtrl+Alt+SRun a structured or fuzzy query
sqry: QueryCtrl+Alt+QRun a raw sqry query
sqry: Find CallersShow all callers of the selected symbol
sqry: Find CalleesShow all callees of the selected symbol
sqry: Find ReferencesCtrl+Alt+RShow all references to the selected symbol
sqry: Trace PathFind call paths between two symbols
sqry: Find UnusedDetect dead code in the workspace
sqry: Find CyclesDetect circular dependencies
sqry: Find DuplicatesDetect duplicate code
sqry: Rebuild IndexCtrl+Alt+IForce a full index rebuild
sqry: Restart Language ServerRestart the sqry LSP server
sqry: Scan WorkspaceRun full diagnostic scan across workspace
sqry: Show Graph StatsDisplay codebase statistics
sqry: Show Call GraphOpen call graph visualization
sqry: Export ResultsExport current results as JSON, Markdown, or CSV