angular-switcher 0.1.0

Switch between Angular component files (.ts, .html, styles, .spec.ts) from the Zed editor with a customizable keybinding.
Documentation
# Installation

## 1. Install the binary

### Homebrew (macOS / Linux)

```bash
brew install danieljancar/tap/angular-switcher
```

This is the recommended path on macOS and Linux. Tap repo: <https://github.com/danieljancar/homebrew-tap>.

### Shell installer (macOS / Linux)

```bash
curl --proto '=https' --tlsv1.2 -LsSf https://github.com/danieljancar/angular-switcher/releases/latest/download/angular-switcher-installer.sh | sh
```

The installer is generated by [dist](https://opensource.axo.dev/cargo-dist/) and verifies SHA256 checksums before placing the binary at `~/.cargo/bin/angular-switcher` (or `$CARGO_HOME/bin` if set).

### PowerShell installer (Windows)

```powershell
powershell -ExecutionPolicy Bypass -c "irm https://github.com/danieljancar/angular-switcher/releases/latest/download/angular-switcher-installer.ps1 | iex"
```

### From crates.io

```bash
cargo install --locked angular-switcher
```

This places `angular-switcher` in `~/.cargo/bin`. Make sure that directory is on your `$PATH`.

### Manual prebuilt binaries

Each [GitHub release](https://github.com/danieljancar/angular-switcher/releases) ships archives for:

- `x86_64-unknown-linux-gnu`
- `x86_64-unknown-linux-musl`
- `aarch64-apple-darwin`
- `x86_64-apple-darwin`
- `x86_64-pc-windows-msvc`

Each archive is accompanied by a `.sha256` file plus a unified `sha256.sum` for verification.

### From source

```bash
git clone https://github.com/danieljancar/angular-switcher
cd angular-switcher
cargo install --locked --path .
```

## 2. Verify

```bash
angular-switcher --version
which zed   # must exist — this CLI shells out to it
```

On macOS the bundled CLI at `/Applications/Zed.app/Contents/MacOS/cli` is used as a fallback if `zed` isn't on `$PATH`.

## 3. Wire up Zed

### Tasks

Copy [`templates/tasks.json`](../templates/tasks.json) into one of:

- `~/.config/zed/tasks.json` (global)
- `.zed/tasks.json` (project-local)

If the file exists, merge the JSON array entries.

### Keybindings

Copy [`templates/keymap.json`](../templates/keymap.json) into `~/.config/zed/keymap.json`. Merge the `bindings` block if you already have one.

### Verify in Zed

1. Open any Angular component `.ts` file.
2. Press `Alt+Shift+S`.
3. The sibling `.html` should open in the same window.

If nothing happens, run the task directly from Zed's command palette → `task: spawn` → pick "Angular: cycle next sibling". Any error will surface in the task output panel.

## Uninstall

```bash
cargo uninstall angular-switcher
rm -rf ~/.config/angular-switcher
```

Remove the angular-switcher entries from your Zed `tasks.json` and `keymap.json`.

## Maintainer: release pipeline

The release pipeline is fully automated. It combines two industry-standard tools:

- **[release-plz]https://release-plz.dev/** opens a "release PR" on every push to `main` with the proposed version bump and a curated changelog entry. Merging the PR creates the git tag and publishes the crate to crates.io.
- **[dist]https://opensource.axo.dev/cargo-dist/** (formerly `cargo-dist`) listens for the tag, cross-compiles to five targets, attaches archives + SHA256s to a GitHub Release, and publishes the Homebrew formula to `danieljancar/homebrew-tap`.

### Day-to-day flow

1. Land changes on `main` via PRs as usual.
2. release-plz opens (or updates) a PR titled `chore: release` with the version bump in `Cargo.toml` and a generated `CHANGELOG.md` entry. Edit the changelog as you like before merging.
3. Merge the release PR. release-plz tags the commit and `cargo publish`es the crate.
4. The tag triggers `release.yml` (dist). Within minutes the GitHub Release is live with binaries, installers, and an updated Homebrew formula.

### Required secrets

See the [SECRETS section in the repo README](../README.md#release-secrets-summary) for the canonical checklist.

### Regenerating the dist workflow

If you upgrade dist or change `[workspace.metadata.dist]` in `Cargo.toml`, regenerate `.github/workflows/release.yml` with:

```bash
cargo install --locked cargo-dist
dist init --yes
```

The generated file has a banner — never edit it by hand.