nvim-treesitter / nvim-treesitter/nvim-treesitter-textobjects

Refined incremental selection

Open
#98 1 comment 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement
Dominant language
Tree-sitter Query
Stars
2.8k
Forks
271
Avg merge
8d 8h
Merged PRs (30d)
1

Description

Although the original incremental selection is good, it can be improved. It goes from the very bottom to the top, which can be tedious sometimes. Leveraging text objects, we can ensure that what we select are always that text object we specified earlier.

Refined incremental selection work this way:
User type some command that specify a text object and enter visual mode.
When user increase or decrease the node in the syntax tree, he can only reach a new text object (or syntax structure) that can match the query.

I have some time and I'm happy to contribute this feature. XD

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

No files, tests, or entry points are identified. Start by locating the existing incremental-selection implementation and its text-object or syntax-query handling. Done should mean that increasing or decreasing the syntax-tree node selects only a matching text object or syntax structure.

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
Stale
Clarity
Mostly clear
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.