Skip to content

Instantly share code, notes, and snippets.

View sudo-adduser-jordan's full-sized avatar
🇺🇸

jordan sudo-adduser-jordan

🇺🇸
View GitHub Profile
@sudo-adduser-jordan
sudo-adduser-jordan / hendricks_formatter.ex
Created February 7, 2026 11:55 — forked from pmarreck/hendricks_formatter.ex
An Elixir formatting module for `mix format` that converts leading spaces to tabs.
defmodule HendricksFormatter do
@moduledoc """
This module is a formatter plugin for Elixir's `mix format` task
that converts leading whitespace to tabs.
It tries to intelligently determine the tab width based on the most common
counts of leading space runs in the file.
It allows additional space characters for minor adjustments that are below the tab width.
OK, why tabs? Why resurrect this age-old nerd debate again?
Very simple: It's an accessibility issue:
https://adamtuttle.codes/blog/2021/tabs-vs-spaces-its-an-accessibility-issue/