Code assistance when writing Cairo smart contracts for StarkNet.
Makes use of the Cairo Language Server.
Note: This is an early preview 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
au BufReadPost *.cairo set filetype=cairo
au Filetype cairo set syntax=cairo
-
Add Coc's example Vim configuration to
~/.vimrc
-
Install Nile by following its Getting started steps, or follow the Cairo environment setup steps.
-
For syntax highlighting, download https://github.com/starkware-libs/cairo-lang/blob/master/src/starkware/cairo/lang/ide/vim/syntax/cairo.vim to
~/.vim/syntax/
-
Use Vim to open a
.cairo
file.