nvim-treesitter / nvim-treesitter/nvim-treesitter-textobjects
do not set jump list when in operator mode or visual mode
Nobody has claimed this yet.
- Dominant language
- Tree-sitter Query
- Stars
- 2.8k
- Forks
- 271
- Avg merge
- 8d 8h
- Merged PRs (30d)
- 1
Description
set_jumps should be a function, and the default implementation should only return true when the mode is normal mode.
In operator mode the cursor will not move, so there is no need to set it to jump list.
And in visual mode, if we do something like 'y' ,'d', or 'c', the cursor will restore, so there is not need to set the jump list, and making this option a function can let the user to decide when to set the jump easily.
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.
Research direction
Start by locating the set_jumps option and its current jump-list handling in the plugin. Check how normal, operator-pending, and visual modes are represented, then update the default behavior so only normal mode returns true while allowing a user-supplied function. Add or update coverage for these mode cases if tests for this option exist.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- lua, neovim
- Domain
- devtools
- Issue type
- Feature
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100