nvim-mini / nvim-mini/mini.nvim
A module to work with hierarchical text structure
Nobody has claimed this yet.
- Dominant language
- Lua
- Stars
- 9.5k
- Forks
- 310
- Avg merge
- 4h 16m
- Merged PRs (30d)
- 1
Description
Contributing guidelines
- I have read CONTRIBUTING.md
- I have read CODE_OF_CONDUCT.md
Module(s)
new
Description
The suggested name is 'mini.hierarchy'. In particular:
-
Automatically compute hierarchy of the buffer text based on configurable sources (like "treesitter", "lsp", "indent"). It should be done only when needed, in debounced fashion, and ideally with as little computation as possible. Overall similar to 'mini.diff'.
The hierarchical structure is a tree-like array of table nodes each containing information about its range, type and/or name, and a recursive array of children nodes (should have ranges inside the parent range). Sibling ranges should intersect, but their union is allowed to not cover the whole parent range (i.e. there can be "empty" spots).
-
Provide functionality that leverages the text hierarchy. Like:
- Incremental selection in Visual mode: select parent/child/next-sibling/prev-sibling. Probably behind default
si/sI/sn/sNmappings. - Navigate to start of parent/child/next-sibling/prev-sibling. Probably behind default
[{/]}/]]/[[. Not sure how to navigate to their end, as navigate to start/end of the node based only on cursor is not really useful as it will use the smallest node. - Possibly textobjects for 'mini.ai'.
- Compute "current hierarchy branch" to be displayed as the typical "breadcrumbs" in winbar. See #983.
- Automatically dim parts of text that are not in the "current hierarchy branch". See #2392.
- Toggle-able overview of the whole tree structure.
- Fold method that folds based on the nesting level of the "hierarchy node at cursor".
- Incremental selection in Visual mode: select parent/child/next-sibling/prev-sibling. Probably behind default
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
No implementation file or test is named. Start by reviewing the existing mini.diff module and the proposed treesitter, LSP, and indent sources, then read the linked issues #983 and #2392. The work is complete only when the scope is defined and a configurable, debounced hierarchy can support the selected navigation, selection, display, dimming, overview, or folding behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- lua
- Domain
- tooling
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Quiet
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100