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

do not set jump list when in operator mode or visual mode

Open
#864 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

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

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 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.