-
Notifications
You must be signed in to change notification settings - Fork 250
[Feature request] nvim-tree hijack_cursor
functionality
#604
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
Comments
hijack_cursor
functionalityhijack_cursor
functionality
This should be relatively trivial to do. This is a very small area for touching, basically add a bit of logic after 439 (the space indent) to determine the correct column for the cursor. |
Attempting to tackle this one as an fyi |
@ashkan117 When you have some code that you would like to have reviewed, feel free to submit a PR against the main branch I will see the PR but also I am really bad at replying to notifications so feel free to tag me on it so I can review it :) |
Am I right in guessing that the focus node is not triggered with hjkl movements? I can see that eventually something triggers the method then the col gets updated to the correct thing. Other than that things look like they work as expected |
I would not think that
I don't know what you mean here. Is this an issue? If so, could you elaborate? I'm glad you're getting progress either way :) |
That's correct. It is used to restore the focused node after a refresh, for the "reveal" commands, and for the
There are many things that may trigger a refresh, which will call focus_node. If you use |
Ok that makes sense. I think in my case the reveal command was triggering the change I saw. Is there a place I should move my logic then? Since in my head the col should be reevaluated on moves and focus_node? Basically my issue is that I am not sure where to put the logic that determines the col of the node |
"Keeps the cursor on the first letter of the filename when moving in the tree."
In my opinion it's little easier (or more "pleasant" to eye) to follow where cursor is when it's always on first letter of dir/file.
When moving cursor with
jk
and open/close nodes withhl
, with this feature in nvim-tree that feels much better.https://github.com/nvim-tree/nvim-tree.lua/blob/9e87ee2d6e86f37ff09cb74ec7dcf2ac984a01e9/doc/nvim-tree-lua.txt#L478
The text was updated successfully, but these errors were encountered: