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

https://github.com/flo0807/zed-phoenix-snippets

A collection of Phoenix and LiveView snippets for Zed IDE.
https://github.com/flo0807/zed-phoenix-snippets

Last synced: 4 months ago
JSON representation

A collection of Phoenix and LiveView snippets for Zed IDE.

Awesome Lists containing this project

README

          

# Zed Phoenix Snippets

A collection of Phoenix and LiveView snippets for Zed IDE. 🔮

> [!NOTE]
> This extension is not yet available in the official Zed extensions store.

## Installation

1. Clone this repo:
```bash
git clone https://github.com/Flo0807/zed-phoenix-snippets
```
2. Go to **Extensions** menu in Zed IDE
3. Click "Install Dev Extension"
4. Select the cloned folder

## Available Snippets

| Prefix | Description |
|--------|-------------|
| `lv-module` | A complete LiveView module with basic structure |
| `lv-live-component-module` | LiveView live component module |
| `lv-live-component` | Render a live component |
| `lv-func-component` | Function component definition |
| `lv-attr` | Component attribute definition |
| `lv-slot` | Component slot definition |
| `lv-mount` | LiveView mount function |
| `lv-handle-params` | LiveView handle_params function |
| `lv-handle-event` | LiveView handle_event function |
| `lv-handle-info` | LiveView handle_info function |
| `lv-render` | LiveView render function with HEEx template |
| `lv-assign` | Assign values to socket |
| `lv-push-navigate` | Push navigation to another route |
| `lv-push-patch` | Push patch to update current route params |
| `lv-flash` | Put flash message |
| `lv-subscribe` | Subscribe to PubSub topic and check if LiveView is connected |
| `lv-form` | Form with LiveView event bindings |
| `lv-input` | Form input field with error handling |
| `lv-button` | Button component with phx-click event |
| `lv-link-href` | Link component with href attribute |
| `lv-link-navigate` | Link component with navigate attribute |
| `lv-link-patch` | Link component with patch attribute |
| `lv-heroicon` | Heroicon component |
| `lv-if` | Conditional rendering in HEEx template |
| `lv-if-else` | Conditional rendering with else in HEEx template |
| `lv-for` | For comprehension in HEEx template |
| `phx-broadcast` | Broadcast message via PubSub |
| `phx-subscribe` | Subscribe to PubSub topic |