A zed extension that brings full Pact language support to the Zed editor.
- 🎨 Syntax highlighting
- 📑 Smart outline view for quick navigation
- 📦 Code folding
- ⚡️ Built-in tasks for running Pact files and tests
- 🚀 Intelligent code assistance:
- Auto-completion
- Real-time error checking
- Hover documentation
- Go to definition
- And more!
Pactup is the easiest way to manage your Pact installation:
follow the instructions to install Pactup: https://github.com/kadena-community/pactup then run the following commands:
# Install the latest nightly build
pactup install nightly --force
# Set it as your active version
pactup use nightly
Quick one-liner (no installation required):
npx pactup install nightly --force && npx pactup which nightly
# /home/salama/.local/share/pactup/pact-versions/nightly
Copy the path to the pact installation and append /bin/pact
then paste it in your Zed settings
{
"lsp": {
"pact": {
"binary":{
"path": "/home/salama/.local/share/pactup/pact-versions/nightly/bin/pact",
"arguments": ["--lsp"]
}
}
}
}
You can specify a custom Pact binary in your Zed settings:
- Open Zed Settings
- Add the following configuration:
{
"lsp": {
"pact": {
"binary":{
"path": "/path/to/your/pact",
"arguments": ["--lsp"]
}
}
}
}
The extension will look for a Pact binary in this order:
- Custom path specified in Zed settings
- System PATH
- Automatically downloaded nightly build (cached for future use)
💡 Tip: Using Pactup is recommended as it helps you manage and update your Pact installation easily.
To update to the latest nightly build:
pactup install nightly --force
pactup use nightly
You can also specify a Pact version for your project by creating a .pact-version
file in your project root:
nightly
Want to contribute? Here's how to set up the extension locally:
- Clone the repository:
git clone https://github.com/kadena-community/pact-zed
- Open Zed
- Go to
Settings
→Extensions
- Click
Install Dev Extension
and select thepact-zed
folder
Contributions are welcome! Feel free to:
- Open issues for bugs or feature requests
- Submit pull requests
- Share feedback