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

Preview

Eric Lau

|
2,360 installs
| (0) | Free
Cairo language support for StarkNet 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

Code assistance when writing Cairo smart contracts for StarkNet.

Makes use of the Cairo Language Server.

Note: This is an early preview release and is still in active development.

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
  • Terms of use
  • Trademarks
© 2023 Microsoft