How to change the size of floating window of the preview feature(`use_float = true`)
As title. I assume this can be set inside the ['P'] = { 'toggle_preview', config = { ... } }.
It's not actually configurable yet. It's hard coded to 120 or available remaining space when it is opened from a sidebar, or the width of the Neo-tree window if opening from a bottom/top window (which you would likely use for the diagnostics extension)
Happy to wait for the customization options(since I love customizing floating windows :P), but you don't need to do this in a hurry! (reasons below)
@cseickel Well, I just realized the current default (by removing the config = { use_float = true} part) just fits my need(my imagination on the usage)! In my use case, I will open a lot of windows under current (neo)vim tab, and it's quite cumbersome to know whether certain file would look nice when put it under the current window split (say I mis-open a file on a split, I will need to kill the buffer, so one more step during the redo) but the current default just work:
In the demo the preview occupies the last window where I move my cursor into neo-tree. This is intuitive!
https://user-images.githubusercontent.com/24765272/191318695-3162a8f4-9220-4497-adcd-e72f0c59ed59.mov
i use this config:
window = {
position = "float",
popup = { -- settings that apply to float position only
size = { height = "17", width = "45" },
position = "50%", -- 50% means center it
},
},
@dobbbri It will be nice to format your multi-line codes within a pair of triple back-quotes: ```
i use this config:
window = { position = "float", popup = { -- settings that apply to float position only size = { height = "17", width = "45" }, position = "50%", -- 50% means center it }, },
this solution worked beautifully.