File tree Expand file tree Collapse file tree 3 files changed +8
-3
lines changed Expand file tree Collapse file tree 3 files changed +8
-3
lines changed Original file line number Diff line number Diff line change @@ -698,9 +698,13 @@ Window / buffer setup.
698
698
Configuration options for floating window
699
699
700
700
*nvim-tree.view.float.enable*
701
- Display nvim-tree window as float (enforces | nvim-tree.actions.open_file.quit_on_open | if set).
701
+ Display nvim-tree window as float (enforces if set).
702
702
Type: `boolean ` , Default: `false`
703
703
704
+ *nvim-tree.view.float.quit_on_focus_loss
705
+ When in floating mode, autoclose the popup when the popup loses the focus.
706
+ Type: `boolean ` , Default: `true`
707
+
704
708
*nvim-tree.view.float.open_win_config*
705
709
Floating window config. See | nvim_open_win | for more details.
706
710
Type: `table` or `function ` that returns a table, Default:
Original file line number Diff line number Diff line change @@ -418,7 +418,7 @@ local function setup_autocommands(opts)
418
418
})
419
419
end
420
420
421
- if opts .view .float .enable then
421
+ if opts .view .float .enable and opts . view . float . quit_on_focus_loss then
422
422
create_nvim_tree_autocmd (" WinLeave" , { pattern = " NvimTree_*" , callback = view .close })
423
423
end
424
424
end
@@ -463,6 +463,7 @@ local DEFAULT_OPTS = { -- BEGIN_DEFAULT_OPTS
463
463
},
464
464
float = {
465
465
enable = false ,
466
+ quit_on_focus_loss = true ,
466
467
open_win_config = {
467
468
relative = " editor" ,
468
469
border = " rounded" ,
Original file line number Diff line number Diff line change @@ -267,7 +267,7 @@ function M.fn(mode, filename)
267
267
end
268
268
269
269
function M .setup (opts )
270
- M .quit_on_open = opts .actions .open_file .quit_on_open or opts . view . float . enable
270
+ M .quit_on_open = opts .actions .open_file .quit_on_open
271
271
M .resize_window = opts .actions .open_file .resize_window
272
272
if opts .actions .open_file .window_picker .chars then
273
273
opts .actions .open_file .window_picker .chars = tostring (opts .actions .open_file .window_picker .chars ):upper ()
You can’t perform that action at this time.
0 commit comments