sergio

sergio

Here’s a quick 3 minute video explaining how to get a great workflow for Phoenix Liveview templates. Good dev ux!

Showing Posts 1 to 7

Nefcairon

Nefcairon

Does it also handle heex?

sergio

sergio OP

It does, works great! Just make sure you add the file association for .heex templates.

"files.associations": {
  "*.eex": "html-eex",
  "*.leex": "html-eex",
  "*.heex": "html-eex"
},
Nefcairon

Nefcairon

You can also use it for .sface. It just doesn’t reformat constructs like:

{#for item <- @list}
<h1>Item: {item}</h1>
{#else} No items {/for}
cvkmohan

cvkmohan

using prettier-plugin-eex has several problems in the formatting. It replaces code with <eext1 /> in many cases.
Further, it does not handle heex files well. For example <link phx-track-static rel="stylesheet" href={Routes.static_path(@conn, "/assets/app.css")} /> this line generates an error - because href={} is not handled correctly.
If you are using surface, far superior solution is GitHub - surface-ui/surface_formatter · GitHub.
In the upcoming elixir 1.13 release, custom formatters are supported https://github.com/elixir-lang/elixir/pull/11246 - and - we should expect a good elixir formatter that understands both HTML and elixir interpolation should arrive.

sergio

sergio OP

That is good to know thank you for sharing. Do you know if anyone is working on a leex/heex custom Elixir formatter for Elixir 1.13?

soup

soup

It’s on the roadmap:

https://github.com/phoenixframework/phoenix_live_view/issues/1506

Considering 1.13’s focus I would assume it’s probably appearing in that (or maybe LiveView can ship it externally as a mix format plugin, not sure how all that goes together).

mekusigjinn

mekusigjinn

Any word on this now that 1.13 is out? Okay I’m impatient I understand :smiley: 1.13 is like out for only a few days so I’ll wait more

— All posts loaded —

Where Next? Top

Trending in Screencasts Top

lubien
Several weeks ago I was nerd snipped by browsers support for View Transitions API and took to myself to see how that goes in LiveView. Af...
New

Other Trending Topics Top

garrison
Hobbes is a low-level distributed database for the Elixir programming language. Hobbes provides a simple, safe, and scalable storage lay...
New
mcass19
ExRatatui lets you cook up rich terminal UIs in Elixir, powered by Rust’s ratatui via Rustler NIFs. Build interactive terminal applicatio...
New
Damirados
Hello everyone. After busy few months I am happy to announce v0.1.0 of Emerge &amp; Solve. They are GUI (Emerge) and State management (S...
New
netoum
Corex is an accessible, unstyled UI component library for Phoenix that integrates Zag.js state machines using Vanilla JavaScript and Live...
New
wintermeyer
There are three potential reasons for members of this forum to have a look at https://vutuv.de You are tired or annoyed of LinkedIn. Yo...
New
webofbits
Aludel - LLM Evaluation Workbench Aludel is an embeddable Phoenix LiveView dashboard for evaluating and comparing LLM prompts across mult...
New

We're in Beta

About us Mission Statement

Options

Thread Display Mode




Thread Preview

Skip Thread Previews