Everscale (TON) Solidity is the language used in Everscale blockchain to create smart contracts. This extension provides:
- Syntax highlighting
- Snippets with details
- Checking for errors, warnings and highlighting it
- Display an information popup on hover
- Suggesting function params when typing
- Search of definition
- Code formatter
- DeBots interfaces highlighting, autocompletion, support for imports
Extension can be installed from the Visual Studio Code Marketplace.
Also You can launch Quick Open, paste the following command, and press Enter
ext install everscale.solidity-support
With shell commands installed, you can use the following command to install the extension:
$ code --install-extension everscale.solidity-support
git clone https://github.com/pizza-777/everscale-solidity-vscode-extension.git
npm install
npm install -g vsce
vsce package
Then go to Extensions tab and click on the three dots on the top and select "Install from VSIX". Choose generated the .vsix file.
You can add the following to your settings.json
:
{
"files.associations": {
"*.sol": "ton-solidity",
"*.tsol": "ton-solidity"
}
}
{
"[ton-solidity]": {
"editor.defaultFormatter": "everscale.solidity-support",
"files.trimTrailingWhitespace": false,
"files.trimFinalNewlines": false,
"editor.formatOnSave": false,
"editor.formatOnPaste": false,
"editor.formatOnType": false
}
}
To configure code formatting you can use standart prettier.io rules.
For example:
{
"overrides": [
{
"files": ["*.sol","*.tsol"],
"options": {
"printWidth": 60,
"tabWidth": 2,
"useTabs": false,
"singleQuote": false,
"bracketSpacing": false,
"explicitTypes": "always"
}
}
]
}
For example, light and dark themes: "Solarized Light" and "Material Theme":
Use Ctrl+Space
This extension only working with TON Solidity language. If You are using Ethereum Solidity, use other extensions for this. You have quick switch between two solidity languages:
If You found a typo or want to improve something, a pull request is welcome. Some files meaning and locations:
./src/snippets/completion.json
— almost all completions snippets
./src/snippets/hover.json
— all hover popups
./src/syntaxes/ton-solidity.json
— syntax highlighting rules
Telegram: @pizzza777