Language Server Protocol for Clarity (including Visual Studio Code extension)
The Language Server Protocol (LSP) defines the protocol used between an editor or IDE and a language server that provides language features like auto complete, go to definition, find all references etc.
This makes programming in Clarity easier and much more intuitive.
Clarity LSP repository is available here. The extension for Visual Studio Code can be downloaded directly from Visual Studio Marketplace, but can be and older version. For a more up to date version you can also download it from open-vsx.
A read—eval—print loop (REPL), also termed an interactive toplevel or language shell, is a simple, interactive computer programming environment that takes single user inputs (that is, single expressions), evaluates (executes) them, and returns the result to the user; a program written in a REPL environment is executed piecewise.
Instructions on how to install Clarity REPL can be found here.
Clarinet is a Clarity runtime packaged as a command line tool, designed to facilitate smart contract understanding, development, testing and deployment. Clarinet consists of a Clarity REPL and a testing harness, which, when used together allow you to rapidly develop and test a Clarity smart contract, with the need to deploy the contract to a local devnet or testnet.
Clarinet 101 contains multiple Clarinet video tutorials
Getting started with Clarinet
You can verify you have Clarinet installed by checking its version:
$ clarinet --version
More detailed information on using Clarinet is available here. However to get you started, the following commands are important to know.
Create a new project and enter its directory:
clarinet new my-project && cd my-project
Create a new contract inside
clarinet contract new mycoolcontract
Check the syntax of Clarity:
To test your contract:
Enter Clarinet's console: