
# Zed Editor

[Zed](https://zed.dev) is a fast, native code editor. Four extensions make it a full workplace for Spring for Dart and Flutter: one understands Spring's annotations and configuration, one runs and debugs Flutter apps, one sends HTTP requests, and one gives Zed two dark themes made for them.

| Extension | What it gives | Version |
|---|---|---|
| [Spring for Dart](spring-for-dart.md) | Navigation from injection points to beans and from `${key}` to properties, hovers, checks while you type, SpEL highlighting, config completion from the Spring metadata, snippets, the Properties language | 0.7.1 |
| [Flutter Tools](flutter-tools.md) | Run and debug on the iOS Simulator, Android, web and desktop, hot reload on save, hot restart, Flutter DevTools, `build_runner watch` in the background, 144 snippets that add their imports | 0.3.0 |
| [HTTP Client](http-client.md) | IntelliJ IDEA's HTTP Client: run requests from `.http` files with a gutter button, environments, response chaining, and requests generated from routes and HTTP calls in 50 frameworks | 0.3.1 |
| [Farum Azula Themes](themes.md) | Two dark themes, Farum Azula Dark (opaque) and Farum Azula Transparent, with one syntax palette | 0.1.3 |

Each extension works alone. Installed together, they add up: Flutter Tools ships the colour rules for the Spring for Dart language server's tokens, the themes colour them, and the HTTP Client reads the port of a Spring for Dart application from its `application.yml` when it generates a request.

## How they fit together

A typical day with a Spring for Dart server and a Flutter app:

1. You write a `@RestController` with Spring for Dart's snippets (`spservice`, `spconfig`). Hovering a constructor parameter shows which bean it gets; a typo in `@Value(r'${shop.nmae}')` is underlined at once.
2. Flutter Tools' `dart run: bin/main.dart` task starts the server and hot reloads it on every save. A new `@GetMapping` restarts the application by itself.
3. The HTTP Client's **🌐 Generate .http request** lens above the new mapping writes a ready request to `.zed/http/endpoints/`, with the server's port already in `baseUrl`. The ▶ in the gutter sends it.
4. In the Flutter app, `Flutter: debug on iOS Simulator` boots a simulator and runs the app under the debugger. Saving a widget reloads it; DevTools opens in a window next to Zed.

## Installation in short

None of the extensions is in Zed's extension registry yet. They are installed as dev extensions from a clone of their repository, with Rust from rustup:

```sh
git clone https://github.com/farum-azula/zed_editor_extensions.git
cd zed_editor_extensions
./install.sh          # Windows: powershell -ExecutionPolicy Bypass -File install.ps1
```

That installs Flutter Tools, the HTTP Client and the themes. Spring for Dart is installed with `zed: install dev extension` from a clone of spring_core_dart. Uninstall Zed's own Dart extension before Flutter Tools. The details are on the [Installation](installation.md) page.

## Things Zed extensions cannot do

Zed's extension API is younger than VS Code's, and some limits show in these pages:

- **No panels or windows.** HTTP responses appear in the terminal, and Flutter DevTools opens in a browser window next to Zed.
- **No command palette entries or key bindings.** Actions are tasks (`task: spawn`), gutter buttons, code lenses and `Cmd-.` actions; the pages give keymap entries to add yourself.
- **Gutter buttons only in the extension's own languages.** That is why the HTTP Client offers a lens rather than a ▶ in your source code, and why Flutter Tools defines the Dart language.

## Repositories

- [farum-azula/zed_editor_extensions](https://github.com/farum-azula/zed_editor_extensions): Flutter Tools, HTTP Client, Farum Azula Themes, and the install scripts.
- [farum-azula/spring_core_dart](https://github.com/farum-azula/spring_core_dart), folder `extensions/zed/dart_spring`: Spring for Dart, released together with the framework.

Spring for Dart is under the Apache License 2.0; the other three are under the MIT license.
