File tree Expand file tree Collapse file tree 2 files changed +6
-1
lines changed Expand file tree Collapse file tree 2 files changed +6
-1
lines changed Original file line number Diff line number Diff line change @@ -701,6 +701,10 @@ Window / buffer setup.
701
701
Display nvim-tree window as float (enforces | nvim-tree.actions.open_file.quit_on_open | if set).
702
702
Type: `boolean ` , Default: `false`
703
703
704
+ *nvim-tree.view.float.autoclose
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 . autoclose 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
+ autoclose = true ,
466
467
open_win_config = {
467
468
relative = " editor" ,
468
469
border = " rounded" ,
You can’t perform that action at this time.
0 commit comments