b0o / nvim-tree-preview.lua

🍃 Floating preview windows for nvim-tree
MIT License
59 stars 2 forks source link

Update preview.lua #2

Closed daUnknownCoder closed 4 months ago

daUnknownCoder commented 4 months ago

vim.iter for 0.10 and vim.tbl_map for 0.9

b0o commented 4 months ago

Hey there, thanks for the PR! I was previously using vim.iter but it broke compat with 0.9 (#1), so I switched to vim.tbl_map in https://github.com/b0o/nvim-tree-preview.lua/commit/fafbe769353627788f4ad83c71ff080ea5eedfba.

Since vim.tbl_map isn't deprecated, I'm not sure if there is much benefit in this proposed change. I'm also concerned that the logic inside of the map function is duplicated. What do you think?

daUnknownCoder commented 4 months ago

On further check, I guess so yes it might be a little duped ik vim.tbl_map() isn't deprecated but if there are nightly users who may want to test the speed or similar stuff would prefer :iter over vim.tbl_map

b0o commented 4 months ago

I don't think there's enough benefit to justify the extra complexity. I'm going to close this for now, but once 0.10 is officially released I'll reconsider moving to vim.iter.

daUnknownCoder commented 4 months ago

I don't think there's enough benefit to justify the extra complexity. I'm going to close this for now, but once 0.10 is officially released I'll reconsider moving to vim.iter.

yeah i would guess so, anyway this plugin is goddamn good