-
Notifications
You must be signed in to change notification settings - Fork 173
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
option to choose/disable textobjects-move module adding to jumplist #50
Comments
Could you try #51? This only applies to the |
yes, it is for textobject.move Thank you so much not only for the PR but also the speed of it! EDIT:--- |
What do you mean by The PR only avoids to call https://github.com/theHamsta/nvim-treesitter/blob/06a6510637352251b1d43a1e81d3a9d951cfd0a5/lua/nvim-treesitter/utils.lua#L132-L134 explicitly. Can you check whether this line still gets called on your machine? We use |
By immediately I mean the "normal" jump lists are set as and when the jumps happen. But with the feature of the PR, (textobject.move with set_jumps=false), the jumplist for the move is updated only when I exit the buffer, not until then. I will check for the call in a few hours! |
Just added an echo to it to see whether it gets called. With the set_jumps set to false, it does not call the function! and it calls when set to true! so it is working as desired. It is strange that it still updates the jump list, only on buffer exit |
I'm really not an expert on how this works. Is there a sequence of commands on how o can reproduce this so I can ask about it (nvim_set_cursor) at Nvim gitter? Do you have the same problem when you just call nvim_set_cursor instead of the text object movements? |
I honestly dont know how to reproduce it as its not always consistent. For what its worth, I would do these:
Sorry but i dont know how to call nvim_win_set_cursor(opts). if you mean the default vim jumps such as ]], ]} etc.. then they dont have this problem. they update/add to jump list immediately when called/jumped |
This is the only move related function that we are calling (second argument cursor pos)
When you can reproduce your issue only by calling this function then it's likely a Neovim issue. I can't reproduce your issue. I never see any jumps with |
you are right! I can reproduce calling the _set_cursor(args) function. Then your PR works wonderfully! |
Maybe you open an issue at Neovim. I'm sure they can help you much more than I. I'll ask on gitter whether this function is supposed to set any jumps. |
Thank you for the help with gitter! I will create an issue on neovim later today. Also for this feature! Shall I close? |
It will be automatically closed once the PR is merged. |
Is your feature request related to a problem? Please describe.
I'm always frustrated when [not a problem exactly, but when textobject/move adds to jumplist.]
Describe the solution you'd like
I would like to just move away to my hearts content around the code and not worry about populating the jumplist with textobject@loop.outer, etc..
Additional context
Textobjects/move is a great feature. it makes navigating through code so much more intuitive, especially in large pages. But I would like to keep the jumplist separate so I can navigate back only to places where I have some edits instead of revisiting random "inspection" jumps from the past. It would make the move module even more necessary and good to use.
Goes without saying, thanks for this plugin, for me personally this and playground are the most important tree-sitter modules to be!
The text was updated successfully, but these errors were encountered: