feat(view): Floating nvim tree window #1377 (#1462)

* Simple mock-up of floating nvim-tree window

* Passing whole table to nvim_open_win()

* Run update-help.sh

* Use vim.api alias

* Add comment to float options

* Added `anchor` to float options

* Enabling float window enforces `actions.open_file.quit_on_open`

* Added documentation

* add view.float.open_win_config, skipping validation

* Made nvim-tree window closes when float is enabled

* Close nvim-tree window when out of focus

* Update help

Co-authored-by: Krzysztof Cieśla <krzysztof.marcin.ciesla@cern.ch>
Co-authored-by: Alexander Courtis <alex@courtis.org>
This commit is contained in:
Krzysztof Cieśla
2022-08-06 07:40:07 +02:00
committed by GitHub
parent 1685484738
commit 7323c81bd6
4 changed files with 78 additions and 21 deletions

View File

@@ -280,7 +280,7 @@ function M.fn(mode, filename)
end
function M.setup(opts)
M.quit_on_open = opts.actions.open_file.quit_on_open
M.quit_on_open = opts.actions.open_file.quit_on_open or opts.view.float.enable
M.resize_window = opts.actions.open_file.resize_window
if opts.actions.open_file.window_picker.chars then
opts.actions.open_file.window_picker.chars = tostring(opts.actions.open_file.window_picker.chars):upper()