{"id":23220432,"url":"https://github.com/chardoncs/indent-wizard.nvim","last_synced_at":"2025-04-05T15:26:41.172Z","repository":{"id":268548318,"uuid":"904623631","full_name":"chardoncs/indent-wizard.nvim","owner":"chardoncs","description":"Simple indentation configuration and guessing plugin for Neovim","archived":false,"fork":false,"pushed_at":"2025-03-25T06:03:42.000Z","size":16,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-29T03:53:23.598Z","etag":null,"topics":["indentation","lua","luajit","neovim","neovim-plugin"],"latest_commit_sha":null,"homepage":"","language":"Lua","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/chardoncs.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-12-17T08:49:45.000Z","updated_at":"2025-03-25T06:03:45.000Z","dependencies_parsed_at":"2024-12-17T13:19:04.713Z","dependency_job_id":"a386e983-b1f1-4ca1-a35a-a5ab88764e26","html_url":"https://github.com/chardoncs/indent-wizard.nvim","commit_stats":null,"previous_names":["chardoncs/indent-wizard.nvim"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chardoncs%2Findent-wizard.nvim","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chardoncs%2Findent-wizard.nvim/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chardoncs%2Findent-wizard.nvim/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chardoncs%2Findent-wizard.nvim/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/chardoncs","download_url":"https://codeload.github.com/chardoncs/indent-wizard.nvim/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247356357,"owners_count":20925811,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["indentation","lua","luajit","neovim","neovim-plugin"],"created_at":"2024-12-18T22:12:07.069Z","updated_at":"2025-04-05T15:26:41.056Z","avatar_url":"https://github.com/chardoncs.png","language":"Lua","readme":"# indent-wizard.nvim 🧙\n\nSimple indentation configuration and guessing plugin for Neovim\n\n## Install\n\n### Manual\n\n```lua\nrequire(\"indent-wizard\").setup {}\n```\n\n### [lazy.nvim](https://github.com/folke/lazy.nvim)\n\n```lua\n{\n  \"chardoncs/indent-wizard.nvim\",\n  opts = {},\n}\n```\n\n## Usage\n\n### Configuration\n\n#### Default configuration\n\nThis snippet is about default config. You don't need to copypasta it.\n\n```lua\nrequire(\"indent-wizard\").setup {\n  -- Auto guess and set buffer-wise indentation for each buffer\n  auto_guess = true,\n  scan = {\n    -- How many lines of sample in a file should be used for indentation guessing.\n    --\n    -- NOTE: 0-indented lines are ignored.\n    line_count = 25,\n    -- How many lines should be skipped.\n    --\n    -- If the number is between 0~1, indent-wizard will regard it\n    -- as percentage of total lines.\n    offset = 0,\n  },\n  -- Default settings\n  defaults = {\n    -- Nothing by default\n  },\n}\n```\n\n#### Fallback indentations\n\nHere is how fallback settings (`defaults`) looks like:\n\n```lua\nrequire(\"indent-wizard\").setup {\n  defaults = {\n    -- Global settings, will be applied to `vim.opt`\n    {\n      -- All options are optional\n      options = {\n        tabstop = 8,\n        softtabstop = 4,\n        shiftwidth = 4,\n        expandtab = true,\n        smartindent = true,\n      },\n    },\n    -- Filetype-wise settings, will be applied to `vim.bo`\n    {\n      ft = \"go\",\n      options = {\n        shiftwidth = 4,\n        expandtab = false,\n      },\n    },\n    {\n      -- Or multiple filetypes\n      ft = {\"c\", \"cpp\", \"rust\", \"zig\"},\n      options = {\n        shiftwidth = 4,\n        expandtab = false,\n      },\n    },\n  },\n}\n```\n\n### Commands\n\n- `IndentInfo`: Guess the indentation and print the summary\n  - Output: `Apparently: shiftwidth=\u003csw\u003e, expandtab=\u003cet\u003e`\n    - `\u003csw\u003e`: Number for shiftwidth, or `?` for inconclusive\n    - `\u003cet\u003e`: If expands tab, `yes`, `no`, or `?` (inconclusive)\n- `GuessIndent`: Guess the indentation and update the configuration\n  - Output: `Apparently: shiftwidth=\u003csw\u003e, expandtab=\u003cet\u003e`\n    - `\u003csw\u003e`: Number for shiftwidth, or `?` for inconclusive\n    - `\u003cet\u003e`: If expands tab, `yes`, `no`, or `?` (inconclusive)\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fchardoncs%2Findent-wizard.nvim","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fchardoncs%2Findent-wizard.nvim","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fchardoncs%2Findent-wizard.nvim/lists"}