brainlid

brainlid

VS Code formatter for .html.leex and .html.eex files?

What do you use to format your .html.leex and .html.eex files? I’m using VS Code and haven’t found a beautifier I’m happy with yet.

I’d also prefer not to install a Ruby gem for it to work.

Most Liked

praveenperera

praveenperera

So far this (prettier-plugin-eex) is the one that works the best.

I’m using it with vscode using Run on Save - Visual Studio Marketplace

  "emeraldwalk.runonsave": {
    "commands": [
      {
        "match": "\\.l?eex$",
        "cmd": "prettier --write ${file}"
      },
    ]
  },

Thank you for this

brainlid

brainlid

The general consensus I’ve gotten from others is that currently nothing works well and everyone is hand formatting them.

Last Post!

lastgosumatt

lastgosumatt

Hi there, also had a problem with this, now i use “HookyQR.beautify”
just to add settings.json:

"beautify.language": {
     "html": [
      "htm",
      "html",
      "html-eex"
    ]
  },
  "files.associations": {
    "*.html.eex": "html-eex",
    "*.html.leex": "html-eex",
  },
  "[html-eex]": {
  "editor.defaultFormatter": "HookyQR.beautify"
  },

Where Next?

Popular in Questions Top

rms.mrcs
Hi, I need to transform a list of numbers into a map where the keys are the indexes and the values are the original values of the list. ...
New
vegabook
I’m brand new to Phoenix and I have stripped one of the demo applications to the bone. I just want to get an svg up on the screen. Here i...
New
vonH
When I run the Plug and I recompile I wind up having to use Ctrl C to quit iex and start again. Witht the help of rlwrap I can use the cu...
New
PeterCarter
There are pre-rolled solutions for other frameworks that do work. However, Phoenix does not seem to have these. Have people had good expe...
New
9mm
I am constructing a JSON object (map) and I need to conditionally set a field. I’m trying to write proper elixir-way code… and I’m at a l...
New
belgoros
I’m not a pro in using Regex and can’t figure out why the following behaviour happens, especially if we take into account the difference ...
New
fayddelight
I tried installing elixir 1.11.2 erlang 23.3.4 via asdf in my zsh shell. Enabled the versions locally and globally. When I list them ...
New

Other popular topics Top

jononomo
I am trying to figure out how Mix knows whether the environment is test, dev, or prod – where is this set? Thanks.
New
hariharasudhan94
I would like to know what is the best IDE for elixir development?
New
chrismccord
Phoenix 1.4.0 released Phoenix 1.4 is out! This release ships with exciting new features, most notably with HTTP2 support, improved deve...
688 31586 112
New
AstonJ
Seen any cool LiveView demos, sample apps or examples? Please post them here! :003:
New
saif
Hello everyone, Long time lurker first time poster here. I’ve recently begun working on Elixir full-time again! :raised_hands: It’s been...
New
dblack
I’ve got an issue with an app and I’ve no idea of how to troubleshoot it. I’m hoping someone here might have seen something similar. I p...
New

We're in Beta

About us Mission Statement