Skip to content
This repository has been archived by the owner on Feb 20, 2024. It is now read-only.

Latest commit

 

History

History
31 lines (22 loc) · 1.52 KB

VSCODE.md

File metadata and controls

31 lines (22 loc) · 1.52 KB

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.