christoomey / vim-tmux-navigator

Seamless navigation between tmux panes and vim splits
MIT License
5.07k stars 319 forks source link

Fix lazy.nvim where most recent stable release doesn't read keybinds (Vim -> tmux broken) #382

Closed samgarmany closed 2 months ago

samgarmany commented 3 months ago

I had to change my plugin configuration for lazy.nvim for my keybinds within neovim to work, I added event type "VeryLazy" because that is what this part of the lazyvim documentation seemed to suggest.

That being said I understand that other users have had success using event type "BufPreRead" and I'm not sure if that one could be better in some way.

Here are the issues that this relates to:

381

379

294

christoomey commented 2 months ago

I've yet to take the jump to full neovim and Lazy.nvim (soon, I hope), but I appreciate the team effort here and references to the other issues so I'm going to optimistically merge this. Thanks for the update!

samgarmany commented 2 months ago

I took one more look at the lazy.nvim docs to see if there’s any reason to use the bufpreread event type. While I still don’t really know if that would be faster, I found this which says that plug-ins should be lazy loaded automatically when they use the key key.

So I now think that the original plugin implementation was fine but there exists a bug in lazy.nvim. I’ll put in an issue report with the lazy team this weekend (if nobody beats me to it) but I think the three best options now are leaving a comment for the user after that line, commenting out the whole line and letting the user uncomment as needed, or not adding the line and waiting for lazy.nvim to fix it.

I’ll commit an example

samgarmany commented 2 months ago

I found that the original config works just fine after I changed from NvChad to LazyVim. I'm closing this, if someone else finds that keybinds aren't working, try adding that event, but for everyone else it shouldn't be needed.