A simple, fast indentation detection plugin for Neovim that finds the first standard indentation pattern in a file.
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.
Neovim users who work with multiple codebases or files with varying indentation styles and want automatic, predictable indentation detection without complex configuration.
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.
Dumb automatic fast indentation detection for Neovim written in Lua
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
Uses a simple scanning algorithm that quickly identifies the first standard indentation pattern, making it efficient without heavy computation as highlighted in the README.
Always selects the first occurrence, ensuring consistent and understandable results, which is a core philosophy of the plugin.
Supports customizable widths and per-filetype settings, allowing fine-tuned control over detection rules through the setup function.
Written in Lua with minimal dependencies and a straightforward approach, reducing setup complexity and overhead.
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.
Lacks advanced heuristics used by plugins like vim-sleuth, so it may not handle complex or mixed indentation patterns effectively.
Enabling the skip_multiline option for better accuracy reduces speed, as noted in the configuration, creating a balance between performance and detection quality.