feliperenan
Heex formatter - a Formatter for Heex templates
Hi people ![]()
We have been working on a Formatter to format Heex templates. The idea is to have a similar experience as we do when formatting Elixir code :).
Please, we’d love if you try it out and let us know any feedback you have. In the repo, you can find the instructions on how to install and use it and, here you can see how it is supposed to format.
Here is the Repo link: GitHub - feliperenan/heex_formatter: Formatter for Phoenix Live View templates. · GitHub
Thank you
Most Liked
feliperenan
It is now part of Live View ![]()
zenw0lf
Seems like today the only thing you need is GitHub - elixir-lsp/elixir-ls: A frontend-independent IDE "smartness" server for Elixir. Implements the "Language Server Protocol" standard and provides debugger support via the "Debug Adapter Protocol" · GitHub and edit your .formatter.exs to:
[
import_deps: [:ecto, :phoenix],
plugins: [Phoenix.LiveView.HTMLFormatter],
inputs: ["*.{heex,ex,exs}", "priv/*/seeds.exs", "{config,lib,test}/**/*.{heex,ex,exs}"],
subdirectories: ["priv/*/migrations"]
]
As for VSCode settings.json:
"[phoenix-heex]": {
"editor.defaultFormatter": "JakeBecker.elixir-ls",
"editor.formatOnSave": true
},
If you want to be able to use Emmet in you .heex files, add this to settings.json:
"emmet.includeLanguages": {
"html-eex": "html",
"phoenix-heex": "html"
},
cvkmohan
Welcome @feliperenan !!!
I have been very vocal about this library here already. Formatter for HEEx templates - #12 by cvkmohan
Friends, this library made my vscode setup leaner ( I was using beautify and more extensions earlier.) and @feliperenan has been very responsive to attend to my queries. A big applause.
Popular in Questions
Other popular topics
Categories:
Sub Categories:
Forums
Popular Tags
- #ecto
- #liveview
- #troubleshooting
- #learning-elixir
- #deployment
- #library
- #erlang
- #testing
- #genserver
- #mix
- #absinthe
- #remote-other
- #otp
- #plug
- #how-to-question
- #macros
- #postgres
- #channels
- #elixirconf
- #exunit
- #discussion
- #code-sync
- #javascript
- #podcasts
- #onsite
- #dialyzer
- #docker
- #authentication
- #umbrella
- #full-time-contract
- #podcasts-by-brainlid
- #ecto-query
- #elixir-ls
- #phoenix_html
- #iex
- #blog-post
- #graphql
- #genstage
- #ai
- #websockets
- #supervisor
- #advent-of-code
- #elixirconf-us
- #distillery
- #processes
- #forms
- #api
- #metaprogramming
- #security
- #performance








