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
