Skip to content
| Marketplace
Sign in
Visual Studio Code>Programming Languages>sollidity-plusNew to Visual Studio Code? Get it now.
sollidity-plus

sollidity-plus

better-sollidity

|
8 installs
| (0) | Free
Better Etheruem Soliditty Language for Visual Studio Code
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

Smart Contract Development in VS Code (Solidity)

Extension Version
Downloads
Installs
User Rating

The Solidity language powers Ethereum smart contracts. This Visual Studio Code extension provides helpful features such as:

  • Highlighting syntax
  • Snippets for common patterns
  • Compile single contract with F1 → “Compile Solidity Contract” or just F5
  • Compile all contracts via F1 → “Compile All Solidity Contracts”, or use Ctrl + F5 / Cmd + F5
  • IntelliSense for contracts and dependencies
  • Jump to definitions
  • Project-wide references lookup
  • Hover-over documentation
  • Quick actions (switch compiler, insert SPDX license, etc.)
  • Multi-repo support using discovery files like remappings.txt, hardhat.config.js, etc.
  • Expected folder layout: contracts inside src/, libraries inside lib/
  • EIP82-based compilation support (dappfile + package dependencies)
  • Switch between remote or local Solidity versions
  • Pull verified contracts & ABI from Etherscan
  • Integration with Nethereum for generating DTOs and services post-compilation
  • Linting via Solhint and Ethlint

To use as a standalone language server:

npm i -g vscode-solidity-server
vscode-solidity-server --stdio

Custom Compiler Versions

If you need a compiler version other than the built-in one, use the versions hosted in the solc-bin repo.

Four ways to customize:

  • Remote version
  • Local JS file
  • Node module
  • Embedded version

Adjust via user or workspace settings.

Remote compiler

Fetches directly from solc-bin:

"solidity.compileUsingRemoteVersion": "latest"

Local version

Manually download .js build and point your config to the local path:

"solidity.compileUsingLocalVersion": "C:\\Path\\To\\soljson-v0.8.18+commit.87f61d96.js"

NPM install

You can also install the compiler as a local package:

npm install solc

Set settings accordingly to use it.

File-specific compiler

It's possible to assign a different compiler for individual contracts.


ERC Snippets & Interfaces

To save time, ERCs and commonly used interfaces are built into the extension. Just type erc to insert them.

You can also use uni to auto-complete Uniswap V2 interfaces.


Optimizing Compiler

For usage-optimized output:

"solidity.compilerOptimization": 200

Workspace & Remapping Support

Handles multiple contracts in a mono-repo setup using files like hardhat.config.js.

Default dependencies handled from:

"solidity.packageDefaultDependenciesDirectory": ["node_modules", "lib"]

You can specify deeper paths if needed.

Remappings

Remappings help manage dependency paths:

"solidity.remappings": [
    "@lib/=/path/to/lib/",
    "@oz/=/path/to/openzeppelin/"
]

Auto-complete, Compile Errors, Navigation

Get in-line feedback:

"solidity.enabledAsYouTypeCompilationErrorCheck": true,
"solidity.validationDelay": 1500
  • Press F12 or Ctrl+Click for "go to definition"
  • Hover for function/variable descriptions
  • Shift + F12 finds all references

Code Fixes & Quick Actions

Get suggestions like switching compiler or formatting addresses on the fly.


Fetch Verified Contracts from Etherscan

Right-click and input the contract address + network to pull the source + ABI.


Linting Options

Two options:

Solhint (default):

"solidity.linter": "solhint",
"solidity.solhintRules": {
  "avoid-sha3": "warn"
}

Solium/Ethlint:

"solidity.linter": "solium",
"solidity.soliumRules": {
  "quotes": ["error", "double"],
  "indentation": ["error", 4]
}

Code Formatting

Supports Prettier with Solidity plugin. Use .prettierrc:

{
  "overrides": [
    {
      "files": "*.sol",
      "options": {
        "printWidth": 80,
        "tabWidth": 4,
        "useTabs": true,
        "singleQuote": false
      }
    }
  ]
}

Enable on save:

"editor.formatOnSave": true

Alternatively, use forge fmt with Foundry.


Code Generation via Nethereum

The extension can autogenerate API clients based on compiled contract JSON.

To configure automatic generation:

{
  "projectName": "MyProject",
  "namespace": "MyProject",
  "lang": 0,
  "autoCodeGen": true,
  "projectPath": "../MyProjectFolder"
}

Language Options:

  • 0 = C#
  • 1 = VB.NET
  • 3 = F#

Use right-click or command palette to trigger code generation manually or automatically on build.


Multi-Settings Support

Define multiple generation scenarios via .nethereum-gen.multisettings. You can prefix files to group settings per module or team.

[
  {
    "paths": ["out/ContractA.sol/ContractA.json"],
    "generatorConfigs": [
      {
        "baseNamespace": "Contracts.A",
        "basePath": "src/Contracts/A",
        "codeGenLang": 0,
        "generatorType": "ContractDefinition"
      }
    ]
  }
]

You can include multiple configurations for Unity clients, Mud tables, etc.


Getting Involved

To suggest improvements, raise issues or contribute, join us on Discord: https://discord.gg/u3Ej2BReNn


Acknowledgments

Thanks to all contributors, linter devs, syntax refiners, parser maintainers, and Ethereum’s Solidity team. Special thanks to those who created the original Sublime and server tools that helped bootstrap this extension.

  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
© 2025 Microsoft