Skip to content

zarifpour/zed-solidity

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

15 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

๐Ÿ’  Solidity Language Support for Zed

Enhance your Zed editor with Solidity language support through this extension.

CleanShot 2024-02-28 at 02 40 51 on Zed โ€” example sol โ€” zed-solidity@2x

๐Ÿ› ๏ธ Development Setup

1. Clone the repository

git clone https://github.com/zarifpour/zed-solidity

2. Load the extension

Move the zed-solidity directory to ~/Library/Application Support/Zed/extensions/installed.

(Optional) To ensure seamless updates from the extensions page upon the release of a new version, consider renaming the directory to solidity.

3. Installation Options (ensure Docker is running)

First, navigate to the relocated repository in ~/Library/Application Support/Zed/extensions/installed:

cd zed-solidity

Option 1: Automated

Run the following command:

make

That was easy!

Option 2: Manual

  1. Clone the tree-sitter-solidity repository:
git clone https://github.com/JoranHonig/tree-sitter-solidity
  1. Checkout the commit specified in grammars/solidity.toml:
git checkout 5cb506ae419c4ad620c77210fd47500d3d169dbc
  1. Move into the tree-sitter-solidity directory:
cd tree-sitter-solidity
  1. Build the WebAssembly (WASM) file (ensure Docker is running):
tree-sitter build-wasm
  1. Rename the generated WASM file to solidity.wasm.

  2. Relocate the solidity.wasm file to the zed-solidity/grammars directory within this repository.

  3. Remove the solidity.toml file from the zed-solidity/grammars directory.

4. Restart Zed

Run the following command in Zed to reload extensions:

zed: reload extensions

Try opening a .sol file in Zed. You should see syntax highlighting.

Note

If you still do not see syntax highlighting, try quitting Zed and restarting the application.

๐ŸŽธ Contributing

Contributions are welcome! Note that some features, like 'Go to Definition', are not fully supported yet. We encourage enhancements and fixes.

To contribute:

  1. Fork the repo and create a new branch.
  2. Make changes and test them.
  3. Submit a pull request with a clear description.

Check open issues for areas needing improvement. Thanks for helping improve Solidity support in Zed!

contrib.rocks

๐Ÿ† Acknowledgments


Made with ๐Ÿฉต by Daniel Zarifpour