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

Additional text-objects to be handled by incremental selection.

Open
#432 3 comments 0 reactions 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

Is your feature request related to a problem? Please describe.

Incremental selection on nvim-ts is a useful feature, and is logically bound to ts-defined objects. I wonder if we could add more objects to it, so that, it'd not treat a string, for instance, as a single object, but select more gradually within the string, say inside a word ('iw'), for instance, then around word ('aw'), and then the entire string.

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

Start by locating the incremental-selection implementation and the existing text-object definitions in the nvim-treesitter-textobjects plugin. Compare the current Tree-sitter object progression with the requested word and string progression. Done means incremental selection expands through a word, around a word, and then the enclosing string as described.

Written by the indexing model from the issue text.

Assessment

Tech stack
lua
Domain
tooling
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.