File tree Expand file tree Collapse file tree 2 files changed +7
-2
lines changed Expand file tree Collapse file tree 2 files changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -494,6 +494,7 @@ applying configuration.
494
494
},
495
495
open_file = {
496
496
quit_on_open = false,
497
+ eject = true,
497
498
resize_window = true,
498
499
window_picker = {
499
500
enable = true,
@@ -1203,9 +1204,12 @@ Configuration for various actions.
1203
1204
1204
1205
*nvim-tree.actions.open_file.quit_on_open*
1205
1206
Closes the explorer when opening a file.
1206
- It will also disable preventing a buffer overriding the tree.
1207
1207
Type: `boolean ` , Default: `false`
1208
1208
1209
+ *nvim-tree.actions.open_file.eject*
1210
+ Prevent new opened file from opening in the same window as the tree.
1211
+ Type: `boolean ` , Default: `true`
1212
+
1209
1213
*nvim-tree.actions.open_file.resize_window* (previously `view .auto_resize` )
1210
1214
Resizes the tree when opening a file.
1211
1215
Type: `boolean ` , Default: `true`
Original file line number Diff line number Diff line change @@ -196,7 +196,7 @@ local function setup_autocommands(opts)
196
196
create_nvim_tree_autocmd (" BufWipeout" , {
197
197
pattern = " NvimTree_*" ,
198
198
callback = function ()
199
- if utils .is_nvim_tree_buf (0 ) then
199
+ if utils .is_nvim_tree_buf (0 ) and opts . actions . open_file . eject then
200
200
view ._prevent_buffer_override ()
201
201
end
202
202
end ,
@@ -545,6 +545,7 @@ local DEFAULT_OPTS = { -- BEGIN_DEFAULT_OPTS
545
545
},
546
546
open_file = {
547
547
quit_on_open = false ,
548
+ eject = true ,
548
549
resize_window = true ,
549
550
window_picker = {
550
551
enable = true ,
You can’t perform that action at this time.
0 commit comments