Practise VS Code extension API vocabulary: contribution points, activation events, commands, providers, and webviews.
0 / 5 completed
1 / 5
A VS Code extension ___ point declares the extension's capabilities in package.json — for example, contributes.commands, contributes.languages, or contributes.themes.
Contribution points in package.json declare what the extension provides — without writing TypeScript. contributes.commands registers commands in the Command Palette; contributes.languages declares file type associations; contributes.grammars adds syntax highlighting.
2 / 5
VS Code ___ events define when an extension is loaded — for example, onLanguage:typescript or onCommand:myExtension.hello.
Activation events delay extension loading until needed: onLanguage:python only activates the extension when a Python file is opened. This improves VS Code startup time by avoiding loading all extensions upfront.
3 / 5
An extension ___ registers a handler for a specific command that can be invoked from the Command Palette or keybinding.
vscode.commands.registerCommand associates a command ID with a callback function. When the user invokes the command (via Command Palette or keybinding), VS Code calls the registered callback. Registered commands must be declared in contributes.commands to appear in the palette.
4 / 5
A ___ Provider in VS Code supplies data for a specific feature — for example, a CompletionItemProvider supplies autocomplete suggestions.
VS Code's provider model uses Language Providers: CompletionItemProvider (autocomplete), HoverProvider (documentation on hover), CodeActionProvider (lightbulb), DocumentFormattingEditProvider (formatting). Extensions register providers for specific language IDs.
5 / 5
A VS Code ___ is an embedded web view inside a VS Code panel, allowing extensions to render arbitrary HTML/CSS/JavaScript UI.
Webviews are sandboxed web content panels inside VS Code, used for rich UIs like preview panels, documentation renderers, and settings UIs. They communicate with the extension host via postMessage for bidirectional data exchange.