xxdavid

xxdavid

Elixir Alias Autosorter – VS Code extension that automatically sorts aliases in Elixir modules on save

Hi everyone! :waving_hand:

I became tired of manually sorting aliases every time Credo warns they are not in the alphabetical order, and so I created a VS Code extension that sorts the aliases automatically on save (or on demand).

The extension is really trivial, it works just with the text representation (no parsing and traversing ASTs) and it’s fast enough to be run on every save, at least on my machine.

I’ve been using the extension for weeks and it’s been great, so now I would like to share it with you. Any feedback is welcomed. :slightly_smiling_face:

Features

  • Sorts aliases on every save (can be turned off)
  • Sorts aliases on demand using the Sort Elixir Aliases in File command
  • Aliases are sorted only among its group (delimited by newlines or non-aliases)
  • Multi-aliases (such as alias Phoenix.{Controller, PubSub}) are sorted as well
  • Built to comply with Credo.Check.Readability.AliasOrder

Where Next?

Popular in Announcing Top

mspanc
I am pleased to announce an initial release of the Membrane Framework - an Elixir-based framework with special focus on processing multim...
New
RobinBoers
Renders Jinja templates, either from disk or defined at runtime, with support for all native Jinja features (including extends). It does...
New
sonic182
Hi everyone, at Doofinder we have been building llm_composer for some new apps, and we thought it could be useful to share it with the co...
New
bradley
I’ve been working with Claude Code extensively and absolutely love it. However, I’ve come across the challenge of managing configuration ...
New
bentanweihao
Here’s a preview: Here’s the link to download: GenServer cheatsheet Tell me what you think!
New
type1fool
WebAuthnLiveComponent WebAuthnComponents See this post about renaming the package. Passwordless authentication for Phoenix LiveView app...
New
fhunleth
Elixir Circuits is a set of libraries for interacting with hardware. We previously announced Circuits.UART, and now we’re ready to announ...
New
aesmail
Hello guys, I have finally made it. I created an admin interface for a framework. It’s been on my todo list for years and with the curre...
New
belaustegui
Announcing ErrorTracker, an Elixir-based built-in error tracking solution. Features Basic, free, built-in error tracking solution. Trac...
New
jallum
Hey folks :waving_hand: I’ve been building a distributed key-value store in Elixir/OTP called Bedrock. It implements FoundationDB’s arch...
New

Other popular topics Top

dotdotdotPaul
Okay, I'm having a heck of a time trying to figure out how to best handle the validation of belongs_to associations in Ecto. I'm sure I'...
New
lessless
I believe there are people here who are dealing with CSV files import on the daily basis, and since Excel is a really popular tool there ...
New
gshaw
What is the idiomatic way of matching for not nil in Elixir? E.g., First way: defp halt_if_not_signed_in(conn, signed_in_account) when...
New
itssasanka
Hi all, Trying to get some more clarity over utc_datetime and naive_datetime for Ecto: https://hexdocs.pm/ecto/Ecto.Schema.html#module-...
New
grych
Hi folks, Few months ago I have announced the proof-of-concept of the library to manipulate the browsers DOM objects directly from Elixi...
639 49522 488
New
mcarvalho
What is the difference between System.get_env and Application.get_env? For example, what are best practices to use one versus another.
New
fireproofsocks
Forgive me if this is obvious, but how does one delete a database record WITHOUT selecting it first? https://hexdocs.pm/ecto/Ecto.Repo.h...
New
Qqwy
Original source of discussion: This topic on the Pragmatic Programmers' Functional Web Development with Elixir, OTP, and Phoenix forum. ...
New
Nvim
Elixir appears to be a superior language to Python. I don’t see any advantage of Python over Elixir. Are there any?
New
vrod
I am using the Starship cross-shell prompt – it seems pretty nice, but I get some errors: [WARN] - (starship::utils): Executing command ...
New

We're in Beta

About us Mission Statement