File tree 2 files changed +10
-2
lines changed
2 files changed +10
-2
lines changed Original file line number Diff line number Diff line change @@ -669,7 +669,7 @@ Window / buffer setup.
669
669
670
670
*nvim-tree.view.float.open_win_config*
671
671
Floating window config. See | nvim_open_win | for more details.
672
- Type: `table` , Default:
672
+ Type: `table` or ` function ` that returns a table , Default:
673
673
`{`
674
674
`relative = "editor",`
675
675
`border = "rounded",`
Original file line number Diff line number Diff line change @@ -133,9 +133,17 @@ local function set_window_options_and_buffer()
133
133
end
134
134
end
135
135
136
+ local function open_win_config ()
137
+ if type (M .View .float .open_win_config ) == " function" then
138
+ return M .View .float .open_win_config ()
139
+ else
140
+ return M .View .float .open_win_config
141
+ end
142
+ end
143
+
136
144
local function open_window ()
137
145
if M .View .float .enable then
138
- a .nvim_open_win (0 , true , M . View . float . open_win_config )
146
+ a .nvim_open_win (0 , true , open_win_config () )
139
147
else
140
148
a .nvim_command " vsp"
141
149
M .reposition_window ()
You can’t perform that action at this time.
0 commit comments