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

Number repeat

Open
#208 2 comments 2 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.
When I type 2<leader>a I expect the parameter to be moved twice. It does not.

Describe the solution you'd like
To be able to type a number before the keybind and for the function to be repeated that number of times.

Describe alternatives you've considered
Record a macro with the movement and then repeat it. This does work.

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 keybind handling for tree-sitter textobject movement and trace how a typed count reaches the movement command. Compare the requested count behavior with the existing macro alternative, then verify that a count such as 2 repeats the movement twice without changing ordinary keybind behavior.

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.