An open API service indexing awesome lists of open source software.

https://github.com/mfabing/zed-htmx-snippets

HTMX (https://htmx.org) Snippets for Zed Code editor (https://zed.dev)
https://github.com/mfabing/zed-htmx-snippets

htmx snippets zed-editor

Last synced: 21 days ago
JSON representation

HTMX (https://htmx.org) Snippets for Zed Code editor (https://zed.dev)

Awesome Lists containing this project

README

          

# πŸš€ Zed Snippets for HTMX

A curated collection of **Zed editor snippets** [Zed](https://zed.dev) to speed up development with [HTMX](https://htmx.org/).

---

## πŸ“‚ Installation

1. Open Zed.
2. Go to:
**Settings β†’ Snippets β†’ `htmx-snippets.json`**.
3. Copy & paste the snippets from this repo into your `htmx-snippets.json`.
4. Save & reload Zed.
Now type a prefix (like `hx-post`) and hit **Tab** to expand.

### πŸ”— HTMX Snippets

| Prefix | Description |
|--------------------|----------------------------------------------------|
| `hx-get` | Issue a GET request |
| `hx-post` | Issue a POST request |
| `hx-put` | Issue a PUT request |
| `hx-delete` | Issue a DELETE request |
| `hx-patch` | Issue a PATCH request |
| `hx-trigger` | Define an event trigger |
| `hx-target` | Specify response target |
| `hx-swap` | Control how content swaps (`innerHTML`, `outerHTML`, etc.) |
| `hx-select` | Select subset of response to swap in |
| `hx-select-oob` | Out-of-band swap |
| `hx-vals` | Send extra values with request |
| `hx-include` | Include another element’s values |
| `hx-params` | Control which params are submitted |
| `hx-confirm` | Confirmation dialog before request |
| `hx-disable` | Disable HTMX on an element |
| `hx-boost` | Turn links/forms into AJAX |
| `hx-preserve` | Preserve element across swaps |
| `hx-replace-url` | Replace browser URL |
| `hx-push-url` | Push URL into history |
| `hx-history` | Control history cache behavior |
| `hx-indicator` | Show loading indicator |
| `hx-sync` | Coordinate multiple requests |
| `hx-ext` | Enable HTMX extension |
| `hx-example-button`| Example HTMX button (post + target + swap) |