/vscode-cadence

The Visual Studio Code extension for Cadence

Primary LanguageTypeScriptApache License 2.0Apache-2.0


Logo

Bringing Cadence, the resource-oriented smart contract langauge of Flow, to your VSCode Editor.
Read the docs»

Report Bug · Contribute



Installation

Prerequisites

To install the extension, ensure you have:

Install from marketplace

Install the extension via Visual Studio Code marketplace. The extension can be found here:

Cadence Extension

https://marketplace.visualstudio.com/items?itemName=onflow.cadence

Features

Start Emulator

Starting the Flow emulator is as simple as one click. You can also switch between accounts and if your projects contains flow.json it gets automatically loaded by the emulator.

start emulator

Deploy Contracts

Deploy contracts to the emulator without leaving the VSCode editor. The address the contract gets deployed to is returned and available for copying.

deploy contracts

Code Generation

Write cadence code with the speed of light and get your product live before that afternoon coffee. How? Use the snippets provided by VSCode extension.

code generation

But wait, there's much more than meets the eye. VSCode Cadence extension also offers:

  • Syntax highlighting (including in Markdown code fences)
  • Diagnostics (errors and warnings)
  • Code completion, including documentation
  • Type information on hover
  • Go to declaration
  • Go to symbol
  • Document outline
  • Renaming
  • Signature help
  • Symbol highlighting
  • Code actions
  • Declare constants, variables, functions, fields, and methods
  • Add missing members when implementing an interface
  • Apply removal suggestion
  • Apply replacement suggestion
  • Run the emulator, submit transactions, scripts from the editor