Papillon6814

Papillon6814

Hi! I’m wondering if I should use formatter of elixir. I have never used any formatters in past projects.
So do you use formatter? And why do you use it?

Showing Posts 1 to 10

OvermindDL1

OvermindDL1

I still use the formatter even though I really really hate some of the things it does (like no trailing comma’s on multi-line things) just for consistency with what everyone else expects. I do the same with rust’s formatter and C++ formatting via clang and others as well. I may do some slight tweaks in configs (hard tabs instead of spaces because screw 3+width indentations when I’m in a terminal) when possible, but otherwise try to keep it as ‘vanilla’ as I can. It makes it easier for other people to look at and PR to your code.

dimitarvp

dimitarvp

For my Elixir, Rust, JavaScript, JSON and OCaml editing I use formatters even if I don’t like all of their decisions how things should look like.

Truth is, our code will be read by other people so I prefer to be a good citizen.

11
Post #2
dmitrykleymenov

dmitrykleymenov

For me it’s just a question of habit, more using formatter, more getting used to it and more loving things it does.

John-Goff

John-Goff

I love using the formatter, and specifically format on save in my editor, because it allows me to see if my code is right as it happens. If I save my file and everything snaps into place, I know I did things right. If it doesn’t, I know that I have a syntax error somewhere in the code I just wrote. Saves me from flicking back and forth to the server and my editor.

11
Post #4
dimitarvp

dimitarvp

Same, and I absolutely love it.

vinibrl

vinibrl

I use even though I don’t agree with every decision, but to maintain consistency. We also use mix format --check-formatted on CI to ensure the code is formatted.

a8t

a8t

yes. formatting is for computers to worry about, not me and certainly not a whole team. That’s the important part, the consistency.

ditto on using format-on-save to quickly let me know if I biffed it with a syntax blunder or something!

brightball

brightball

I do. I have it setup to run in VSCode on save and my team uses Committee to run it as a precommit hook.

APB9785

APB9785

Creator of ECSx

You all have inspired me to start using the format-on-save Atom plugin!

strzibny

strzibny

Yes, absolutely. We even fail CI build if the code is not formatted. My code is formatted in my editor on save.

Where Next? Top

Trending in Questions Top

katta
I having some trouble figuring out if I have set myself too strict of standards for my production server. Currently I can handle 75% of r...
New
brecabral
Documentation While reading the Scoped Routes section, I noticed that the documentation currently refers to a problem without explainin...
New
achenet
Hello, I’m trying to build a basic Phoenix web-app, and I’d like to use Tailwind. However, when I launch mix phx.server, I get an error...
New
kpanic
Hi everyone, I am toying with the idea of building a “match maker” for giving personal help to people that wants to start coding. I sta...
New
velrest
So my question is quite simple and i have found no conclusive answer on forum, google or AI. Should we use :erlang.float for Integer to ...
New
asweet-confluent
I recently noticed that Elixir’s Logger defaults its primary log level to :debug when no :logger, :level application configuration is pre...
New
mnkhod
So i have been using ash framework for a while and i love it. However currently the issue im having with ash framework is the error handl...
New

Other Trending Topics Top

GenericJam
Edit: 2026 May 15 - This post is archived. Mob is alive!! Main docs: mob v0.7.11 — Documentation A bit of explanation for the slightly c...
New
JesseHerrick
Hey, I’m Jesse and I’m the main contributor behind Dexter, a full-featured, lightning-fast Elixir LSP optimized for large codebases. It s...
New
mudasobwa
I am happy to introduce the very α version of the new programming language compiled to BEAM. Welcome Cure. It has literally three kille...
New
garrison
Hobbes is a low-level distributed database for the Elixir programming language. Hobbes provides a simple, safe, and scalable storage lay...
New
mhanberg
Hi everyone! The first release candidate for the Expert language server project is now available! We’ve published a press release detai...
New
budgie
A little off-topic, but I feel like people here have a good head on their shoulders. I used to be quite good at making software. Was luc...
New

We're in Beta

About us Mission Statement

Options

Thread Display Mode




Thread Preview

Skip Thread Previews