You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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 / sN mappings.
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.
Contributing guidelines
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:
si/sI/sn/sNmappings.[{/]}/]]/[[. 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.