neo-tree.nvim
neo-tree.nvim copied to clipboard
Alternative window picker
Thanks for the nice plugin!
This is not a bug report nor a feature request. Just a suggestion for documentation enhancement.
I use an alternative window picker (ten3roberts/window-picker.nvim, rather than s1n7ax/nvim-window-picker
). The reason is, ten3roberts' plugin offers some other functionality that I like, apart from just returning the picked window ID. I've tried running the two plugins alongside - s1n7ax/nvim-window-picker
for neo-tree
and the other one for my general window picking, but there is a clash in the plugin names: both export the window-picker
name and I haven't been able to configure them both at the same time with folke/lazy.nvim
. Luckily, I've been able to configure window-picker.nvim
to serve as the window picker for neo-tree
with the following settings in lazy.nvim
:
{
"nvim-neo-tree/neo-tree.nvim",
branch = "v3.x",
dependencies = {
{
"ten3roberts/window-picker.nvim",
name = "window-picker",
config = function()
local picker = require("window-picker")
picker.setup()
picker.pick_window = function()
return picker.select({ hl = "WindowPicker", prompt = "Pick window: " }, function(winid)
if not winid then
return nil
else
return winid
end
end)
end
end,
},
}
}
Maybe somebody else would benefit from this, so I thought this snippet could be added to neo-tree
's README. And maybe to neo-tree.nvim/doc/neo-tree.txt
which only mentions https://github.com/s1n7ax/nvim-window-picker
as the possible window picker.
Great shout! The officially recommended window selector doesn't work well for me due to some keymap conflicts, although the relevant issuse has been created https://github.com/s1n7ax/nvim-window-picker/issues/38 but the upstream fixes for this problem have not been active, which puts me in a very passive position. Thanks for trying, it has led me to find another way to solve my problem.
As the README file already contains a lot of information, I would suggest adding this to the wiki instead. What do you think @cseickel ?
As the README file already contains a lot of information, I would suggest adding this to the wiki instead. What do you think @cseickel ? Good point, especially since the snippet is more about
window-picker.nvim
rather than aboutnvim-neo-tree
.
As the README file already contains a lot of information, I would suggest adding this to the wiki instead. What do you think @cseickel ?
I agree, and I actually think the existing window-picker example should be moved to the wiki as well. We should probably have a page for "Plugins that Work with Neo-tree", which would include the window pickers and https://github.com/antosha417/nvim-lsp-file-operations.