# smart-indent.nvim **Repository Path**: mirrors_mammothb/smart-indent.nvim ## Basic Information - **Project Name**: smart-indent.nvim - **Description**: No description available - **Primary Language**: Unknown - **License**: MIT - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2025-06-23 - **Last Updated**: 2026-07-26 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # smart-indent.nvim Automatically detect and apply indentation settings for the current buffer. ## Installation ```lua -- lazy.nvim { "user/smart-indent.nvim", -- setup() is optional — plugin works out of the box opts = {}, } ``` ## Configuration ```lua require("smart-indent").setup({ -- Maximum lines to scan before giving up (-1 for infinite) max_lines = 2048, -- Space indent widths to detect widths = { 2, 4, 8 }, -- Skip comments and strings (uses treesitter or vim syntax) code_only = false, -- Filetype-specific overrides (deep-merged over global config) indent_by_ft = { python = { widths = { 4 } }, rust = { widths = { 4 } }, make = { widths = {} }, -- tabs only yaml = { widths = { 2 } }, lua = { widths = { 2 } }, }, -- Neighbor file scanning (for blank files) neighbor_limit = 8, -- max files to scan per directory neighbor_max_lines = 256, -- lines to read per neighbor neighbor_root_markers = { ".git", ".hg" }, -- stop walking at these }) ``` ## Commands - `:SmartIndent` — manually trigger detection on the current buffer ## API ```lua -- Configure (optional — plugin auto-initializes) require("smart-indent").setup(opts) -- Detect and apply indent for current buffer require("smart-indent").detect() ``` ## Health check ``` :checkhealth smart-indent ``` Validates config fields, checks Neovim version, reports treesitter availability.