nvim-tree.lua
nvim-tree.lua copied to clipboard
Floating window and preview
Is there any chance to have nvim-tree in floating window with files preview in next versions?
i don't think this is a goal i wish to acomplish, although it should be quite easy to do with the api i'll provide in the next version i'm working on.
+1 Unlike the splitting window, the floating window won't mess the window layout.
Hi @kyazdani42, did you by any chance already add the
i don't think this is a goal i wish to acomplish, although it should be quite easy to do with the api i'll provide in the next version i'm working on.
Hi @kyazdani42, did you by chance already add the api you've mentioned?
hi, haven't really had the time to refactor this part yet :)
Looking forward to this feature. I really miss this feature since switching from coc-explorer.
Me too! coc-explorer
is oddly the main thing keeping me from switching to neovim's native LSP 😅
i guess i've rewritten the view handling enough so this can be tackled.
something like extending the view.lua
file to handle a popup
view basically :)
EDIT: with vim.api.nvim_open_win
. I'm not sure the implication it would have on other modules but it should work the same (but maybe the open_file
function would need some change too ?)
I would love that too, this is something that amazed me when I used coc-explorer and it's really missing from this great plugin. It would be great if you could add this 😃
I tried to mess up with view.lua, but my LUA knowledge is almost zero. So I had to switch to lir. :(
Tried 3 another file-tree plugins and Telescope explorer and I'm back again. Too many bugs and issues. Last one had an interesting choice of hotkeys: d for creating a directory, and shift-d to delete a folder (and it even didn't ask if you really want to delete that folder). I deleted my work for full day today.
What a good way to learn how I can extend nvim-tree? Any suggestions?
hi @fragov sorry for the late answer. Well i believe the view should be refactored first before implementing this, i'm not sure it would be too easy to do in the current state of the plugin :) This will land at some point
@lu5je0 any chance you could put something together for this?
Floating nvim-tree window has been implemented. :help nvim-tree.view.float
.
It doesn't seem that floating preview has gained much interest. Please re-open / create a new PR if that's something you have a good use case for.
I think floating-window
is a good feature for nvim-tree
.
If I have two panels simultaneously, a floating window makes it easier to view the file explorer.
Please keep supporting this feature.
Thank you so much.
@lexuancuong it's implemented. See https://github.com/nvim-tree/nvim-tree.lua/issues/135#issuecomment-1288002079
I implemented float preview. Example (asciinema preview may broken, please open link) Code available floatpreview.lua,nvimtree attach. Currently I don't know how to integrate with nvimtree code, but I try in future.
Code available floatpreview.lua,nvimtree attach.
That's incredible! Can you please share this as a Recipe?
Currently I don't know how to integrate with nvimtree code, but I try in future.
That looks like it will fit nicely into open-file, minus the treesitter part ;)
Have a go, open a PR and we can help you.
Hello all, I created PR and this plugin https://github.com/JMarkin/nvim-tree.lua-float-preview. May be to need only plugin and Recipe
? What do you think?
Any official support ?
Please accept my apologies @JMarkin, it was never added. It's present now: Extension Plugins
Please do update the page with a better description.
I hope you have a great experience with it @tracyone
The nvim-tree-float-preview seems to be an amazing extension.
However, I'm unable to follow the installation instruction to get it work.
Hope @JMarkin can kindly elaborate on how it can be installed in the context of lazy.nvim
and lazyvim
with an example.
@hopezh I think readme has example for lazy.nvim, for lazyvim I don't know