{"id":13895633,"url":"https://github.com/echasnovski/mini.indentscope","last_synced_at":"2025-04-12T22:34:32.119Z","repository":{"id":108889469,"uuid":"556849151","full_name":"echasnovski/mini.indentscope","owner":"echasnovski","description":"Neovim Lua plugin to visualize and operate on indent scope. Part of 'mini.nvim' library.","archived":false,"fork":false,"pushed_at":"2025-04-01T14:28:41.000Z","size":81,"stargazers_count":261,"open_issues_count":0,"forks_count":8,"subscribers_count":4,"default_branch":"main","last_synced_at":"2025-04-04T02:07:19.947Z","etag":null,"topics":["lua","mini-nvim","neovim","neovim-plugin"],"latest_commit_sha":null,"homepage":"","language":"Lua","has_issues":false,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/echasnovski.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":"2022-10-24T16:22:07.000Z","updated_at":"2025-04-01T14:28:44.000Z","dependencies_parsed_at":null,"dependency_job_id":"ed063738-0b22-4159-9bc3-a99e59b7398d","html_url":"https://github.com/echasnovski/mini.indentscope","commit_stats":null,"previous_names":[],"tags_count":10,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/echasnovski%2Fmini.indentscope","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/echasnovski%2Fmini.indentscope/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/echasnovski%2Fmini.indentscope/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/echasnovski%2Fmini.indentscope/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/echasnovski","download_url":"https://codeload.github.com/echasnovski/mini.indentscope/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248641996,"owners_count":21138313,"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":["lua","mini-nvim","neovim","neovim-plugin"],"created_at":"2024-08-06T18:02:21.212Z","updated_at":"2025-04-12T22:34:32.090Z","avatar_url":"https://github.com/echasnovski.png","language":"Lua","funding_links":[],"categories":["Lua"],"sub_categories":[],"readme":"\u003cimg src=\"https://github.com/echasnovski/media/blob/main/mini.nvim/logo/logo_indentscope.png\" style=\"width: 100%\"/\u003e\n\n\u003c!-- badges: start --\u003e\n[![GitHub license](https://badgen.net/github/license/echasnovski/mini.nvim)](https://github.com/echasnovski/mini.nvim/blob/main/LICENSE)\n\u003c!-- badges: end --\u003e\n\n### Visualize and work with indent scope\n\n- Customizable debounce delay, animation style, and scope computation options.\n- Implements scope-related motions and textobjects.\n\nSee more details in [Features](#features) and [help file](doc/mini-indentscope.txt).\n\n---\n\n⦿ This is a part of [mini.nvim](https://github.com/echasnovski/mini.nvim) library. Please use [this link](https://github.com/echasnovski/mini.nvim/blob/main/README.md) if you want to mention this module.\n\n⦿ All contributions (issues, pull requests, discussions, etc.) are done inside of 'mini.nvim'.\n\n⦿ See the repository page to learn about common design principles and configuration recipes.\n\n---\n\nIf you want to help this project grow but don't know where to start, check out [contributing guides of 'mini.nvim'](https://github.com/echasnovski/mini.nvim/blob/main/CONTRIBUTING.md) or leave a Github star for 'mini.nvim' project and/or any its standalone Git repositories.\n\n## Demo\n\nhttps://user-images.githubusercontent.com/24854248/173044654-f5f0b928-6bd9-4064-a916-1f980044c7ad.mp4\n\n## Features\n\n- Visualize scope with **animated** vertical line. It is very fast and done automatically in a non-blocking way (other operations can be performed, like moving cursor). You can customize debounce delay and animation rule.\n- Customization of scope computation options can be done on global level (in `MiniIndentscope.config`), for a certain buffer (using `vim.b.miniindentscope_config` buffer variable), or within a call (using `opts` variable in `MiniIndentscope.get_scope()`).\n- Customizable notion of a border: which adjacent lines with strictly lower indent are recognized as such. This is useful for a certain filetypes (for example, Python or plain text).\n- Customizable way of line to be considered \"border first\". This is useful if you want to place cursor on function header and get scope of its body.\n- There are textobjects and motions to operate on scope. Support `v:count` and dot-repeat (in operator pending mode).\n\n## Installation\n\nThis plugin can be installed as part of 'mini.nvim' library (**recommended**) or as a standalone Git repository.\n\nThere are two branches to install from:\n\n- `main` (default, **recommended**) will have latest development version of plugin. All changes since last stable release should be perceived as being in beta testing phase (meaning they already passed alpha-testing and are moderately settled).\n- `stable` will be updated only upon releases with code tested during public beta-testing phase in `main` branch.\n\nHere are code snippets for some common installation methods (use only one):\n\n\u003cdetails\u003e\n\u003csummary\u003eWith \u003ca href=\"https://github.com/echasnovski/mini.nvim/blob/main/readmes/mini-deps.md\"\u003emini.deps\u003c/a\u003e\u003c/summary\u003e\n\u003ctable\u003e\n    \u003cthead\u003e\n        \u003ctr\u003e\n            \u003cth\u003eGithub repo\u003c/th\u003e\n            \u003cth\u003eBranch\u003c/th\u003e \u003cth\u003eCode snippet\u003c/th\u003e\n        \u003c/tr\u003e\n    \u003c/thead\u003e\n    \u003ctbody\u003e\n        \u003ctr\u003e\n            \u003ctd rowspan=2\u003e'mini.nvim' library\u003c/td\u003e \u003ctd\u003eMain\u003c/td\u003e \u003ctd rowspan=2\u003e\u003ci\u003eFollow recommended 'mini.deps' installation\u003c/i\u003e\u003c/td\u003e\n        \u003c/tr\u003e\n        \u003ctr\u003e\n            \u003ctd\u003eStable\u003c/td\u003e\n        \u003c/tr\u003e\n        \u003ctr\u003e\n            \u003ctd rowspan=2\u003eStandalone plugin\u003c/td\u003e \u003ctd\u003eMain\u003c/td\u003e \u003ctd\u003e\u003ccode\u003eadd('echasnovski/mini.indentscope')\u003c/code\u003e\u003c/td\u003e\n        \u003c/tr\u003e\n        \u003ctr\u003e\n            \u003ctd\u003eStable\u003c/td\u003e \u003ctd\u003e\u003ccode\u003eadd({ source = 'echasnovski/mini.indentscope', checkout = 'stable' })\u003c/code\u003e\u003c/td\u003e\n        \u003c/tr\u003e\n    \u003c/tbody\u003e\n\u003c/table\u003e\n\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003eWith \u003ca href=\"https://github.com/folke/lazy.nvim\"\u003efolke/lazy.nvim\u003c/a\u003e\u003c/summary\u003e\n\u003ctable\u003e\n    \u003cthead\u003e\n        \u003ctr\u003e\n            \u003cth\u003eGithub repo\u003c/th\u003e\n            \u003cth\u003eBranch\u003c/th\u003e \u003cth\u003eCode snippet\u003c/th\u003e\n        \u003c/tr\u003e\n    \u003c/thead\u003e\n    \u003ctbody\u003e\n        \u003ctr\u003e\n            \u003ctd rowspan=2\u003e'mini.nvim' library\u003c/td\u003e\n            \u003ctd\u003eMain\u003c/td\u003e \u003ctd\u003e\u003ccode\u003e{ 'echasnovski/mini.nvim', version = false },\u003c/code\u003e\u003c/td\u003e\n        \u003c/tr\u003e\n        \u003ctr\u003e\n            \u003ctd\u003eStable\u003c/td\u003e \u003ctd\u003e\u003ccode\u003e{ 'echasnovski/mini.nvim', version = '*' },\u003c/code\u003e\u003c/td\u003e\n        \u003c/tr\u003e\n        \u003ctr\u003e\n            \u003ctd rowspan=2\u003eStandalone plugin\u003c/td\u003e\n            \u003ctd\u003eMain\u003c/td\u003e \u003ctd\u003e\u003ccode\u003e{ 'echasnovski/mini.indentscope', version = false },\u003c/code\u003e\u003c/td\u003e\n        \u003c/tr\u003e\n        \u003ctr\u003e\n            \u003ctd\u003eStable\u003c/td\u003e \u003ctd\u003e\u003ccode\u003e{ 'echasnovski/mini.indentscope', version = '*' },\u003c/code\u003e\u003c/td\u003e\n        \u003c/tr\u003e\n    \u003c/tbody\u003e\n\u003c/table\u003e\n\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003eWith \u003ca href=\"https://github.com/junegunn/vim-plug\"\u003ejunegunn/vim-plug\u003c/a\u003e\u003c/summary\u003e\n\u003ctable\u003e\n    \u003cthead\u003e\n        \u003ctr\u003e\n            \u003cth\u003eGithub repo\u003c/th\u003e\n            \u003cth\u003eBranch\u003c/th\u003e \u003cth\u003eCode snippet\u003c/th\u003e\n        \u003c/tr\u003e\n    \u003c/thead\u003e\n    \u003ctbody\u003e\n        \u003ctr\u003e\n            \u003ctd rowspan=2\u003e'mini.nvim' library\u003c/td\u003e\n            \u003ctd\u003eMain\u003c/td\u003e \u003ctd\u003e\u003ccode\u003ePlug 'echasnovski/mini.nvim'\u003c/code\u003e\u003c/td\u003e\n        \u003c/tr\u003e\n        \u003ctr\u003e\n            \u003ctd\u003eStable\u003c/td\u003e \u003ctd\u003e\u003ccode\u003ePlug 'echasnovski/mini.nvim', { 'branch': 'stable' }\u003c/code\u003e\u003c/td\u003e\n        \u003c/tr\u003e\n        \u003ctr\u003e\n            \u003ctd rowspan=2\u003eStandalone plugin\u003c/td\u003e \u003ctd\u003eMain\u003c/td\u003e \u003ctd\u003e\u003ccode\u003ePlug 'echasnovski/mini.indentscope'\u003c/code\u003e\u003c/td\u003e\n        \u003c/tr\u003e\n        \u003ctr\u003e\n            \u003ctd\u003eStable\u003c/td\u003e \u003ctd\u003e\u003ccode\u003ePlug 'echasnovski/mini.indentscope', { 'branch': 'stable' }\u003c/code\u003e\u003c/td\u003e\n        \u003c/tr\u003e\n    \u003c/tbody\u003e\n\u003c/table\u003e\n\u003c/details\u003e\n\n\u003cbr\u003e\n\n**Important**: don't forget to call `require('mini.indentscope').setup()` to enable its functionality.\n\n**Note**: if you are on Windows, there might be problems with too long file paths (like `error: unable to create file \u003csome file name\u003e: Filename too long`). Try doing one of the following:\n- Enable corresponding git global config value: `git config --system core.longpaths true`. Then try to reinstall.\n- Install plugin in other place with shorter path.\n\n## Default config\n\n```lua\n-- No need to copy this inside `setup()`. Will be used automatically.\n{\n  -- Draw options\n  draw = {\n    -- Delay (in ms) between event and start of drawing scope indicator\n    delay = 100,\n\n    -- Animation rule for scope's first drawing. A function which, given\n    -- next and total step numbers, returns wait time (in ms). See\n    -- |MiniIndentscope.gen_animation| for builtin options. To disable\n    -- animation, use `require('mini.indentscope').gen_animation.none()`.\n    animation = --\u003cfunction: implements constant 20ms between steps\u003e,\n\n    -- Whether to auto draw scope: return `true` to draw, `false` otherwise.\n    -- Default draws only fully computed scope (see `options.n_lines`).\n    predicate = function(scope) return not scope.body.is_incomplete end,\n\n    -- Symbol priority. Increase to display on top of more symbols.\n    priority = 2,\n  },\n\n  -- Module mappings. Use `''` (empty string) to disable one.\n  mappings = {\n    -- Textobjects\n    object_scope = 'ii',\n    object_scope_with_border = 'ai',\n\n    -- Motions (jump to respective border line; if not present - body line)\n    goto_top = '[i',\n    goto_bottom = ']i',\n  },\n\n  -- Options which control scope computation\n  options = {\n    -- Type of scope's border: which line(s) with smaller indent to\n    -- categorize as border. Can be one of: 'both', 'top', 'bottom', 'none'.\n    border = 'both',\n\n    -- Whether to use cursor column when computing reference indent.\n    -- Useful to see incremental scopes with horizontal cursor movements.\n    indent_at_cursor = true,\n\n    -- Maximum number of lines above or below within which scope is computed\n    n_lines = 10000,\n\n    -- Whether to first check input line to be a border of adjacent scope.\n    -- Use it if you want to place cursor on function header to get scope of\n    -- its body.\n    try_as_border = false,\n  },\n\n  -- Which character to use for drawing scope indicator\n  symbol = '╎',\n}\n```\n\n## Similar plugins\n\n- [lukas-reineke/indent-blankline.nvim](https://github.com/lukas-reineke/indent-blankline.nvim)\n- [michaeljsmith/vim-indent-object](https://github.com/michaeljsmith/vim-indent-object)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fechasnovski%2Fmini.indentscope","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fechasnovski%2Fmini.indentscope","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fechasnovski%2Fmini.indentscope/lists"}