Add `set_jumps` option to `select` module
Nobody has claimed this yet.
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 45/100
Research direction
Start in the select module and compare its option handling with the set_jumps implementation in lua/nvim-treesitter/utils.lua for the move module. The linked targets.vim implementation provides another reference for jumplist behavior. Done means select accepts set_jumps, defaults it to false, and updates the jumplist only when enabled.
Written by the indexing model from the issue text.
Description
Is your feature request related to a problem? Please describe.
Oftentimes I find myself selecting the wrong textobject (eg, vac instead of vax) or just needing to go back to the place my cursor was before I performed the textobject selection. There's no instant way to go back. You have to use vim motions to go to your original position. This is a bit inconvenient because textobjects from wellle/targets.vim add the cursor position to the jumplist just like set_jumps for the move module. So from time to time that muscle memory kicks in and you go back in the jumplist only to find yourself not where you'd expect.
Describe the solution you'd like
Add the option set_jumps, which is present in the move module to the select module. It should default to false for backward compatibility.
Describe alternatives you've considered
None, currently.
Additional context
Textobjects from wellle/targets.vim have the same jumplist functionality enabled by default for a few textobjects, but can optionally be enabled for all of them.
The implementation in targets.vim here and the move module here are functionally the same, so we can reuse the same implementation in select and have consistency between the two plugins.
I can prepare a PR if there's interest in this functionality.
- Dominant language
- Tree-sitter Query
- Stars
- 2.8k
- Forks
- 271
- Avg merge
- 8d 8h
- Merged PRs (30d)
- 1
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from nvim-treesitter/nvim-treesitter-textobjects
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
-
bug
Difficulty 3/5 1-2 days Newbie friendliness 65/100
-
enhancement
Difficulty 5/5 Over a week Newbie friendliness 35/100
-
bug
Difficulty 3/5 1-2 days Newbie friendliness 42/100
nvim-treesitter/nvim-treesitter-textobjects#890 · 4 comments ·
-
bug
Difficulty 3/5 1-2 days Newbie friendliness 55/100
All issues in nvim-treesitter/nvim-treesitter-textobjects
Similar issues
-
comp/cron P2 sweeper:risk-automation type/bug
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
NousResearch/hermes-agent#117792 · 1 comment ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
bancolombia/sentinel#20 ·
-
optimization optimization:agents-md-curator
Difficulty 2/5 1-3 hours Newbie friendliness 86/100
githubnext/gh-aw-cao#13143 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
-
chore
Difficulty 2/5 1-3 hours Newbie friendliness 85/100
alunduil/woodland-generators#669 ·