hadronized / mind.nvim

The power of trees at your fingertips.
Other
688 stars 42 forks source link

[New Feature(s)] Configurable `open_direction` && `open_in_float` options #41

Open cleong14 opened 2 years ago

cleong14 commented 2 years ago

New Feature Suggestions:

Thank you for all your hard work and for your awesome contributions to the Neovim Community!

Cheers!

hadronized commented 2 years ago

Oh that should be quite simple, yes! I will try to work on that in the upcoming week if I find some time, or if anyone wants to give it a try, feel free to.

iggu commented 2 years ago

Hello. I am not familiar with neovim's internals and with lua itself, but want this feature and can try to implement it myself. I investigated the code a bit and think that ui.lua :: M.open_window should be patched, instead of "wincmd H" need to write the corresponding command guessed from the settings. Is that enough? Unfortunately I've got no idea how to make floating window

WorkAround: I just added the mapping lvim.keys.normal_mode["<M-w>"] = "<Cmd>MindOpenProject<CR><C-W>L<Cmd>Goyo<CR>" lvim.keys.normal_mode["<M-W>"] = "<Cmd>Goyo!<CR><Cmd>MindClose<CR>" so that when Mind is needed - I am just opening it in Goyo window.

Fortunately, Mind remembers which items were open/collapsed. Unfortunately, it doesnt remember the selected item.