Skip to content
| Marketplace
Sign in
Visual Studio Code>Programming Languages>Cairo language support for StarkNetNew to Visual Studio Code? Get it now.
Cairo language support for StarkNet

Cairo language support for StarkNet

Preview

Eric Lau

|
4,600 installs
| (0) | Free
Cairo 0.x language support in VS Code
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

Cairo Language Server for VS Code

Note: This project is deprecated in favour of vscode-cairo for Cairo 1.0.

Code assistance when writing Cairo smart contracts for StarkNet.

Makes use of the Cairo Language Server.

Features

  • Compiler support for .cairo files
  • Live diagnostic highlighting for compile errors
  • Quick fixes with suggestions provided by Cairo/StarkNet compiler
  • Go to definitions for imports
  • Code completion for imports

Right-click menu commands using Nile:

  • Nile - Clean
  • Nile - Compile all
  • Nile - Compile this contract
  • Run tests with pytest

Setup

  1. Install Nile by following its Getting started steps, or follow the Cairo environment setup steps.
  2. If using a virtual environment, start VS Code from within that terminal according to the instructions here.
  3. Install this extension along with StarkWare's Cairo extension (.vsix file).
  4. Open a .cairo file and start editing.
  5. If your project's contracts directory is in a subfolder such as src, set the folder name using the sourceDir setting in your VS Code settings under the Cairo LS section.
  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
© 2025 Microsoft