VSCode Clarity language support was limited
Before now, developers had to use two separate extensions to support their Clarity development with auto-completion and syntax highlighting. Additionally, those previous extensions had outdated grammar files and the occasional bug. Community members like Lukas (a member of the Syvita and CityCoins teams) even took it upon themselves to improve some the shortcomings. At one point, developers overwhelmingly had three extensions to choose from!
Needless to say, we could do better…and so we did! We thrilled to unveil that all three extensions have been merged into one. This new extension includes the language grammar files from Lukas, updated Clarity VM, added support for user-defined functions, and fixed critical bugs.
Confidence-inspiring coding with VSCode
With the release of the VSCode extension version 0.5, developers can finally rely its functionality and write smart contracts with confidence! The latest release supports all of the following:
Auto-completion and syntax highlighting of native types, keywords, and functions
Native types, keyword, and functions will be highlighted and auto-completion suggestions will be visible once you type.
Auto-completion for user defined methods
If your contract defines methods, the auto-completion will present them in the suggestions.
For Clarinet projects: Auto-completion for methods in other contracts
If a Clarinet project includes multiple contracts, contract-calls and traits will be suggested for auto-completion.
Syntax checking whenever contracts are saved
Whenever you save Clarity files, the syntax checker will run and highlight issues right away.
Inline error details
Whenever the syntax checker identifies an issue, it will display an error and a description inline.
→ Update or install the VSCode Clarity extension and let us know what you think.
But wait - there is more to come!
We will review the Github issues and listen to your feedback to prioritize the most critical features for the extension. In addition to that, we are exploring how Clarinet could be supported natively inside VSCode. This would allow developers to potentially run and debug tests in a dedicate view. Another possible feature in consideration is a specific view to observe the chainstate, including blocks, transactions, accounts, and contracts.
Stay tuned for more updates and don’t forget to leave your feedback in this GitHub repository.