Hardhat VS Code extension
Hardhat has extensions for Visual Studio Code, Cursor, and Antigravity. These extensions add language support for Solidity and integration with Hardhat and Foundry projects.
Features
Section titled “Features”- Code completions: autocomplete for contract instances, globally available variables, built-in types, and import directives
- Navigation: go to definition, go to type definition, and go to references
- Symbol renames: rename identifiers across the codebase
- Hover help: type and signature information on hover
- Inline validation: compiler warnings and errors as you type
- Code actions: quick fixes like adding visibility modifiers, specifying data locations, implementing interface functions, constraining mutability, fixing address checksums, and more
- Formatting: document formatting for Solidity files
Learn more about it on its Visual Studio Code Marketplace page or Open VSX Registry page.
Installation
Section titled “Installation”Visual Studio Code installation
Section titled “Visual Studio Code installation”To use the extension in Visual Studio Code, please click this link to install it.
Cursor installation
Section titled “Cursor installation”To use the extension in Cursor, please click this link to install it.
Antigravity installation
Section titled “Antigravity installation”To use the extension in Antigravity, please click this link to install it.
Vim and Neovim installation
Section titled “Vim and Neovim installation”To use the Language Server that powers the extension in Vim and Neovim, please refer to the documentation in the @nomicfoundation/solidity-language-server npm package.