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 source root gets its own index status and targeting. The status bar and analysis panels adapt to show per-root information from the LSP sqry/workspaceStatus aggregate, so indexed roots do not appear as a false single-folder “not indexed” state.

For saved .code-workspace files, add a sqry.workspace block to opt into cross-repo analysis:

{
  "folders": [
    { "path": "services/auth" },
    { "path": "services/billing" },
    { "path": "docs" }
  ],
  "sqry.workspace": {
    "sourceRoots": ["services/auth", "services/billing"],
    "memberFolders": ["docs"],
    "exclusions": ["vendor"],
    "projectRootMode": "gitRoot"
  }
}

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.autoIndexOnSave"never"Auto-index on save behavior: never or debounced
sqry.indexRoot""Optional LSP index-root override
sqry.projectRootMode"gitRoot"Extension-side project-root detection mode
sqry.workspaceFolderExcludes[]Workspace folders skipped by extension enumeration loops
sqry.workspaceClassificationnullUser-editable classification used to write a .code-workspace sqry.workspace block
sqry.codeLens.enabledtrueShow caller/callee count lenses above functions
sqry.codeLens.segments["callers", "callees"]Which CodeLens counts to show
sqry.diagnostics.enabledtrueShow unused code, cycles, and duplicates in Problems panel
sqry.diagnostics.unusedCodetrueShow 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": "debounced",
  "sqry.diagnostics.enabled": true
}

Commands

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

CommandShortcutDescription
Sqry: Search WorkspaceCtrl+Alt+SSearch indexed symbols
Sqry: QueryCtrl+Alt+QRun a structured sqry query
Sqry: Find Semantic ReferencesCtrl+Alt+RShow semantic references for the selected symbol
Sqry: Index WorkspaceCtrl+Alt+IBuild or rebuild the workspace index
Sqry: Refresh Index StatsRefresh the sqry pane status display
Sqry: Clear ResultsClear the results panel
Sqry: Restart Language ServerRestart the sqry LSP server
Rebuild IndexRebuild from an index-status tree item
Sqry: Search HistoryRe-run a recent query
Sqry: Scan Workspace for ProblemsRun diagnostics across the workspace
Sqry: Show Call GraphOpen call graph visualization
Sqry: Show DependenciesOpen dependency visualization
Sqry: Filter ResultsFilter current results by language or kind
Sqry: Sort ResultsSort current results
Sqry: Export ResultsExport current results as JSON, Markdown, or CSV
Sqry: Edit Workspace Classification (.code-workspace)Seed or edit the sqry.workspace block in a saved workspace file