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

jumps caused by `select_textobject` not reflected in the jumplist

Open
#842 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.

print("lalala")
^ cursor here

-- lots of code here

function A()
  print("42")
end

"select @function.inner" jumps a large distance to function A, but this is not reflected in the jumplist so the user can't come back with <c-o>

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 tracing the select @function.inner textobject jump in nvim-treesitter-textobjects and how the jump interacts with Neovim's jumplist. Use the provided example to verify that selecting the function records the original cursor position so <c-o> returns to it.

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.