#!/bin/bash # Script to install the Storybook extension for Zed (development mode) set -e echo "Installing Storybook extension for Zed..." # Get the absolute path to the extension directory EXTENSION_DIR="$(cd "$(dirname "$0")/zed-storybook" && pwd)" # Create Zed extensions directory if it doesn't exist mkdir -p ~/.local/share/zed/extensions/installed # Create symlink LINK_PATH=~/.local/share/zed/extensions/installed/storybook if [ -L "$LINK_PATH" ]; then echo "Removing existing symlink..." rm "$LINK_PATH" fi echo "Creating symlink..." ln -s "$EXTENSION_DIR" "$LINK_PATH" echo "" echo "✅ Extension installed successfully!" echo "" echo "Next steps:" echo "1. Restart Zed" echo "2. Open a .sb file (try: $PWD/test-extension.sb)" echo "3. The extension should activate automatically" echo "" echo "To install the LSP server for enhanced features:" echo " cargo install --path storybook --bin storybook-lsp" echo ""