Feature request: Mousewheeel support
Zeioth opened this issue · comments
Back in the day I implemented this in rnvimr and implementing the same feature here would be trivial.
- The only thing necessary for this to work is disabling mouse support while on the yazi.nvim window.
- And re-enabing it when leaving the window.
You can check my PR as reference:
kevinhwang91/rnvimr#58 (comment)
Thanks for the idea!
How is yazi mouse support for you without neovim? My experience has been less than optimal, but I have some trackpad and it may complicate things.
I notice your implementation had some extra logic for tmux. Does this complicate things?
@mikavilpas The main mouse feature is covered in the snippet above.
Yazi still lack a few important mouse features I had back in ranger.
- Scroll preview with mousewheeel.
- Ability to click an item.
Personally I use a programmable keyboard with a trackball and this is x300 user experience for me.
@mikavilpas The main mouse feature is covered here: "Beign able to scroll the list with the mousewheeel".
was this supposed to include a link? I'm curious to read more but don't know where to go 🙂
Anyway, I think this is a cool idea so I'll try to implement it, perhaps as optional at first so we can try it out.
Ok it's a pretty straighforward copy paste. To be honest I would PR it myself, but I'm full for a few days. So whoever go it faster :3
Ok there's now a "soft launch" in the main branch. You need to opt in to this feature like this mikavilpas/dotfiles@f7aff2b
Let me know how it works for you.
I can confirm it works. Thank you so much for adding it so fast!! 🎉🎉
@Zeioth much better mouse support was merged into yazi an hour or so ago sxyazi/yazi#1038
If you're able to build from source (I use cargo install --path yazi-fm
to do this), you might get much better mouse support. Also remember to turn off our "hacky" setting if you try it out:
diff --git a/.config/nvim/lua/plugins/my-file-manager.lua b/.config/nvim/lua/plugins/my-file-manager.lua
index bb70be8..8d278c6 100644
--- a/.config/nvim/lua/plugins/my-file-manager.lua
+++ b/.config/nvim/lua/plugins/my-file-manager.lua
@@ -27,7 +27,6 @@ return {
---@type YaziConfig
opts = {
open_for_directories = true,
- enable_mouse_support = true,
-- log_level = vim.log.levels.DEBUG,
integrations = {
grep_in_directory = function(directory)