Open-Awesome
CategoriesAlternativesStacksSelf-HostedExplore
Open-Awesome

© 2026 Open-Awesome. Curated for the developer elite.

TermsPrivacyAboutGitHubRSS
  1. Home
  2. Neovim
  3. indent-o-matic

indent-o-matic

MITLua

A simple, fast indentation detection plugin for Neovim that finds the first standard indentation pattern in a file.

GitHubGitHub
210 stars13 forks0 contributors

What is indent-o-matic?

Indent-o-matic is a Neovim plugin written in Lua that automatically detects indentation settings in code files. It solves the problem of inconsistent indentation detection by using a simple, fast algorithm that finds the first standard indentation pattern (tabs or 2/4/8 spaces) in a file.

Target Audience

Neovim users who work with multiple codebases or files with varying indentation styles and want automatic, predictable indentation detection without complex configuration.

Value Proposition

Developers choose indent-o-matic for its simplicity and speed—it uses a straightforward "dumb" detection approach that's fast, predictable, and easy to understand compared to more complex statistical detection plugins.

Overview

Dumb automatic fast indentation detection for Neovim written in Lua

Use Cases

Best For

  • Automatically detecting indentation when opening files from different projects
  • Neovim users who prefer simple, predictable plugins over complex heuristics
  • Quickly setting up consistent indentation across mixed-style codebases
  • Learning Lua plugin development for Neovim through a simple codebase
  • Users who want manual control via the :IndentOMatic command
  • Configuring per-filetype indentation rules for specific languages

Not Ideal For

  • Files where the first indentation is atypical, such as those starting with extensive comments or boilerplate code.
  • Projects requiring statistical analysis for high accuracy in detecting mixed or irregular indentation styles.
  • Vim users, as it is Neovim-specific and not compatible with standard Vim.
  • Teams that need detection for non-standard indentation widths beyond 2, 4, or 8 spaces.

Pros & Cons

Pros

Fast Detection

Uses a simple scanning algorithm that quickly identifies the first standard indentation pattern, making it efficient without heavy computation as highlighted in the README.

Predictable Behavior

Always selects the first occurrence, ensuring consistent and understandable results, which is a core philosophy of the plugin.

Configurable and Flexible

Supports customizable widths and per-filetype settings, allowing fine-tuned control over detection rules through the setup function.

Lightweight and Simple

Written in Lua with minimal dependencies and a straightforward approach, reducing setup complexity and overhead.

Cons

Accuracy Limitations

The 'dumb' detection method can be fooled by files where the first indentation is misleading, such as in templates or files with irregular formatting, as admitted in comparisons with smarter alternatives.

No Statistical Analysis

Lacks advanced heuristics used by plugins like vim-sleuth, so it may not handle complex or mixed indentation patterns effectively.

Performance Trade-offs

Enabling the skip_multiline option for better accuracy reduces speed, as noted in the configuration, creating a balance between performance and detection quality.

Frequently Asked Questions

Quick Stats

Stars210
Forks13
Contributors0
Open Issues0
Last commit1 month ago
CreatedSince 2021

Tags

#editor-configuration#developer-tools#lua-plugin#text-editor#neovim-plugin#neovim-lua#code-formatting#neovim#indentation-detection#vim-plugin

Built With

N
Neovim
L
Lua

Included in

Neovim20.6k
Auto-fetched 6 hours ago

Related Projects

indent-blankline.nvimindent-blankline.nvim

Indent guides for Neovim

Stars4,993
Forks122
Last commit8 days ago
hlchunk.nvimhlchunk.nvim

This is the lua implementation of nvim-hlchunk, you can use this neovim plugin to highlight your indent line and the current chunk (context) your cursor stayed

Stars922
Forks47
Last commit1 month ago
guess-indent.nvimguess-indent.nvim

Automatic indentation style detection for Neovim

Stars662
Forks19
Last commit1 year ago
indentmini.nvimindentmini.nvim

A minimal and blazing fast indentline plugin

Stars282
Forks16
Last commit8 months ago
Community-curated · Updated weekly · 100% open source

Found a gem we're missing?

Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.

Submit a projectStar on GitHub