Skip to content

Add foundry-sol extension#6475

Draft
Copernicium282 wants to merge 1 commit into
zed-industries:mainfrom
Copernicium282:main
Draft

Add foundry-sol extension#6475
Copernicium282 wants to merge 1 commit into
zed-industries:mainfrom
Copernicium282:main

Conversation

@Copernicium282

Copy link
Copy Markdown

Foundry-first Solidity language support for Zed.
Forked from zarifpour/zed-solidity.

What's included

  • Syntax highlighting — tree-sitter grammar for .sol and .yul
  • LSP — auto-installs @nomicfoundation/solidity-language-server for go-to-definition, hover, diagnostics, completions
  • Foundry project detection — reads foundry.toml, resolves remappings via forge remappings
  • 32 snippets — core Solidity patterns, ERC interfaces (ERC20/721/1155), NatSpec block templates
  • Code outline — contracts, functions, events, errors in the symbol tree

Changes from upstream

  • Added language_server_initialization_options for proper LSP server handshake
  • Added 32 snippets (core patterns, ERC interfaces, NatSpec blocks)
  • Added snippets key to extension.toml
  • Documented forge fmt and cast source usage in README
  • Documented known Hardhat config limitation with patch script

Testing

Tested as a dev extension with a Foundry project using chainlink-evm dependency:

  • Go-to-definition works for remapped imports
  • Snippets expand correctly
  • LSP detects Foundry project and resolves remappings

Proof

Screencast_20260614_091815.webm

@cla-bot cla-bot Bot added the cla-signed label Jun 14, 2026
@Copernicium282 Copernicium282 marked this pull request as draft June 14, 2026 04:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant