liveBook · Manning

Provider interface

As explained in Crack Any Codebase with AI

A provider interface is an interface that allows an editor or language service to supply a specific language-related capability.

A provider interface is the contract connecting an editor to a language service for one capability. It turns visible features—autocomplete, go-to-definition, or red squiggles—into implementation points that language services can supply. section 4.1

Common provider interfaces include:

  • CompletionItemProvider supplies autocomplete. section 4.1
  • HoverProvider supplies information shown when inspecting code. section 4.1
  • DefinitionProvider supports go-to-definition, while CodeActionProvider supports corrective actions. section 4.1
Table 4.1 Same abstractions, different depth
Abstraction
Ch3 workflow
Ch4 agent
Language Intelligence
"How does VS Code know that foo is undefined? Autocomplete, go-to-definition, and the red squiggles. 50+ provider interfaces (CompletionItemProvider, HoverProvider, DefinitionProvider, CodeActionProvider) define the contract between editor and language services."
"LanguageFeatureRegistry<T> provides typed registration for language feature providers. Scored by language selector matching."
Context Keys
"Why right-clicking gives you different menus in a file versus a terminal: Boolean flags like editorHasSelection that control which commands are active. Integrates with menus, keybindings, and when-clauses across the workbench."
"Boolean/string key-value pairs describing application state. Rich expression language (And, Or, Not, Equals, Regex)."
Extension System
"Extensions can swap in their own file system without touching core code. They contribute to dozens of extension points: themes, languages, debuggers, task providers, view containers, terminal profiles, and authentication providers."
"Manifests (IExtensionDescription), isolated Extension Hosts (separate processes), Extension Points (IExtensionPoint<T>). AbstractExtensionService manages lifecycle."

Compare interface-level descriptions with purpose-level explanations of Language Intelligence and its provider contracts. section 4.1

How Crack Any Codebase with AI covers it

How deep it goes
Names more than 50 provider interfaces and explains their contract role, without descending into individual implementations.
Examples
Uses autocomplete, go-to-definition, red squiggles, CompletionItemProvider, HoverProvider, DefinitionProvider, and CodeActionProvider.
What you can do after
Evaluate/understand language features by tracing visible editor behavior to its provider interface and language service.
How it connects
Links Language Intelligence, language services, editor features, and extension-provided capabilities.

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Crack Any Codebase with AI. The section links point to the parts of the book it draws on.