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

wrapscan support

Open
#863 0 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.

Many motions in nvim can be wrapscanned, for example "n" and "N" when they hit the bottom or the top, they go top or bottom to research. I hope the motion in nvim-treesitter-textobjects can be wrapscanned too.

Describe the solution you'd like

For example, when there is no function below and I use "]m" to go to next, it can go to the first function. That will be definitely fancy if there is a configuration to enable or disable the feature.

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 textobject motion entry point for ]m and the existing navigation configuration. Trace how reaching the end of the available functions is handled, then verify that an opt-in wrapscan setting takes navigation to the first function and that the behavior is covered by the project's relevant tests.

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
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.