Last active
January 30, 2024 19:25
-
-
Save b-j-roberts/d5ca5381c79ea3cdc6558f2080789cf6 to your computer and use it in GitHub Desktop.
Cairo Language Server in CoC using Scarb
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"languageserver": { | |
"cairo1": { | |
"enable": true, | |
"command": "scarb", | |
"args": ["cairo-language-server"], | |
"filetypes": ["cairo"], | |
"rootPatterns": ["Scarb.toml", ".git/"] | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add the following code to your
{vim_config}/coc-settings.json
file after setting up CoC vim / nvim and installing Scarb.NOTE: Code error detection only works inside modules imported in Scarb builds.
ie for the LS to detect errors, there must be a path of
mod module_name;
imports leading tosrc/lib.cairo
. For more info see the Cairo Book