Share your feedback via email, using Mastodon or
[Plugin] Clean code, zero effort: conform.nvim
I’m not a professional developer, a computer scientist, or an IT expert. I’m just someone who writes code to tweak tools for my own needs and build scripts to improve my workflow. Because of that, I often barely know what I’m doing. My code is probably a mess most of the time, but hey, it’s functional!
The real frustration comes from the mistakes I make along the way. Chasing down tiny, silly errors can waste precious time and drive you crazy. Fortunately, Neovim plugins are availble to help catch or identify those bugs for quick fixes. But formatting mistakes? That’s an entirely different headache.
This is exactly where conform.nvim comes to the rescue.
Formatting that stays out of your way
conform.nvim is a quiet, predictable, asynchronous system that keeps your code clean without interrupting your flow. It feels completely unobtrusive.
Because conform.nvim runs asynchronously in the background, the moment you save your file it instantly triggers the appropriate formatter, keeping your editor completely responsive.
You don’t have to stop anymore to fix your formatting before commiting. That mental load completely disappears. You can type as sloppily as you want while drafting a function, knowing it will instantly snap into a beautiful, readable structure the millisecond you save.
Formatting errors are rarely catastrophic but they are constant, distracting, a prime source of stupid mistakes, and can prevent your code from running. By automating the cleanup, conform.nvim completely eliminates an entire category of human error.
One interface, many formatters
Even at my modest level, I juggle multiple languages with their own formatting rules. conform.nvim gives me a single, consistent interface across all of them.
The only thing I had to do is to define the language I use and activate a pre-built rule to format on save like so:
require("conform").setup({
formatters_by_ft = {
css = { "css_beautify" },
html = { "html_beautify" },
lua = { "stylua" },
python = { "isort", "black" },
sh = { "shfmt" },
toml = { "tombi" },
typst = { "typstyle" },
yaml = { "yamlfmt" },
zsh = { "shfmt" },
},
format_on_save = {
timeout_ms = 500,
lsp_format = "fallback",
},
})This is my entire config file for this plugin.
Predictable, Reliable, and Fast
One underrated benefit of conform.nvim is its sheer restraint. It doesn’t try to be overly clever, and it doesn’t demand your attention with flashy UI elements. It focuses on doing one thing flawlessly: running formatters with minimal surprises.
It won’t randomly reformat your entire file unless you ask it to, and it won’t block your workflow with unexpected behavior. You get deterministic formatting, clear control over when it runs, and blazing-fast execution. That predictability builds trust, and once you trust your tools, you stop thinking about them.
Conclusion
At the end of the day, formatting code is a low-value task that demands high-value attention. Every time you pause to adjust a tab, fix an alignment, or manually trigger a linting tool, you are wasting precious cognitive energy. You are pulling your brain out of “problem-solving mode” and forcing it into “janitor mode”. This is exactly wh conform.nvim feels less like a plugin and more like a workflow upgrade.
It creates a friction-free editing experience where you just save your work, and the code instantly snaps into its ideal shape. Ultimately, conform.nvim gives you back your focus. It clears away the surface-level noise of spaces, brackets, and rules, freeing your mind to focus entirely on what truly matters: the logic, the structure, and the intent of your code.
Let the machine handle the formatting. You’ve got real problems to solve :)