File tree Expand file tree Collapse file tree 2 files changed +11
-2
lines changed Expand file tree Collapse file tree 2 files changed +11
-2
lines changed Original file line number Diff line number Diff line change @@ -350,6 +350,7 @@ local DEFAULT_OPTS = { -- BEGIN_DEFAULT_OPTS
350
350
reload_on_bufenter = false ,
351
351
respect_buf_cwd = false ,
352
352
select_prompts = false ,
353
+ bulk_move_get_default_path = nil ,
353
354
sort = {
354
355
sorter = " name" ,
355
356
folders_first = true ,
@@ -608,6 +609,7 @@ local ACCEPTED_TYPES = {
608
609
sort = {
609
610
sorter = { " function" , " string" },
610
611
},
612
+ bulk_move_get_default_path = { " function" },
611
613
view = {
612
614
width = {
613
615
" string" ,
Original file line number Diff line number Diff line change @@ -5,7 +5,9 @@ local rename_file = require "nvim-tree.actions.fs.rename-file"
5
5
local notify = require " nvim-tree.notify"
6
6
7
7
local M = {
8
- config = {},
8
+ config = {
9
+ bulk_move_get_default_path = core .get_cwd
10
+ },
9
11
}
10
12
11
13
function M .bulk_move ()
@@ -14,9 +16,11 @@ function M.bulk_move()
14
16
return
15
17
end
16
18
19
+ local defaultPath = M .config .bulk_move_get_default_path ()
20
+
17
21
local input_opts = {
18
22
prompt = " Move to: " ,
19
- default = core . get_cwd () ,
23
+ default = defaultPath ,
20
24
completion = " dir" ,
21
25
}
22
26
47
51
48
52
function M .setup (opts )
49
53
M .config .filesystem_watchers = opts .filesystem_watchers
54
+ if opts .bulk_move_get_default_path ~= nil then
55
+ M .config .bulk_move_get_default_path = opts .bulk_move_get_default_path
56
+ end
50
57
end
51
58
52
59
return M
You can’t perform that action at this time.
0 commit comments