Skip to content
| Marketplace
Sign in
Visual Studio Code>Other>Code Actions ProviderNew to Visual Studio Code? Get it now.
Code Actions Provider

Code Actions Provider

wmjs

|
31 installs
| (0) | Free
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

Code Action Provider Sample

This sample shows how to provide code actions in the editor. Code actions are used to implement quick fixes and refactoring in VS Code.

The sample uses the CodeActionProvider api to implement a simple set of code actions that convert :) to a smiley emoji in markdown files:

Emoji code actions

Second example of code action provider shows how to associate code actions with diagnostic (e.g. compilation) problems.

Diagnostic code actions

VS Code API

vscode module

  • languages.registerCodeActionsProvider
  • Diagnostic.code
  • CodeActionContext.diagnostics
  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
© 2025 Microsoft