Cairo Language Server
npm install cairo-lsCode assistance for writing Cairo smart contracts for StarkNet.
Works with any IDE or text editor that supports the Language Server Protocol.
Note: This is an early preview release and is still in active development.
- 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
Cairo language support extension
1. In an empty directory, run the following to install the language server:
```
npm install cairo-lsYOUR_DIRECTORY
2. Configure a language client for your IDE to launch the language server with the following command (replace with the directory where you ran the command in step 1):```
node YOUR_DIRECTORY/cairo-ls/node_modules/cairo-ls/out/server.js --stdio
3. Install Nile by following its Getting started steps, or follow the Cairo environment setup steps.
4. Open a .cairo file in your IDE or text editor.