-
-
Notifications
You must be signed in to change notification settings - Fork 79
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
feat: add option to execute tvp node command on leaf toggle #440
feat: add option to execute tvp node command on leaf toggle #440
Conversation
I'm not sure why the tests are failing 😓 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the pr @antosha417, although I'm still not sure I want to do this. You mentioned in the discussion that this is common in other tree-like plugins. Could you give me some examples? Also if we do this, I don't think I'd want it as another setting. I try to avoid having configuration options and am really careful about adding new ones.
Don't worry about the tests. There has been something funky going on lately that I'm unable to debug or haven't spent a lot of time on. As long as they are passing locally you're fine. |
I've also noticed this behavior: When I close some of the split buffers and my cursor automatically goes to tvp buffer than this jump to last window doesn't work and the file opens in tvp panel. -- Jump to the last window so this doesn't open up in the actual tvp panel
vim.cmd([[wincmd p]]) The easiest way to reproduce it is to just close all the windows except of tvp panel. But it can happen on other circumstances. So I'm thinking maybe in this case we want to create new window for it. With something like this: -- Jump to the last window so this doesn't open up in the actual tvp panel
vim.cmd([[wincmd p]])
if vim.api.nvim_get_current_buf() == self.bufnr then
local alignment = "topleft"
if config.panel_alignment == "left" then
alignment = "botright"
end
vim.cmd(string.format("silent %s vertical new ", alignment))
end What do you think? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Alright, got around to playing around with this. I think it's non-invasive enough that this is totally fine. Thanks a lot for the PR! LGTM
I would love having some icons. |
This was proposed in this discussion. And for me this option would make tvp feature more pleasant to use.