feat(neo-tree): load neo-tree when specifying a direcory on the cmdline
This commit is contained in:
@ -20,11 +20,16 @@ return {
|
|||||||
},
|
},
|
||||||
init = function()
|
init = function()
|
||||||
vim.g.neo_tree_remove_legacy_commands = 1
|
vim.g.neo_tree_remove_legacy_commands = 1
|
||||||
|
if vim.fn.argc() == 1 then
|
||||||
|
local stat = vim.loop.fs_stat(vim.fn.argv(0))
|
||||||
|
if stat and stat.type == "directory" then
|
||||||
|
require("neo-tree")
|
||||||
|
end
|
||||||
|
end
|
||||||
end,
|
end,
|
||||||
opts = {
|
opts = {
|
||||||
filesystem = {
|
filesystem = {
|
||||||
follow_current_file = true,
|
follow_current_file = true,
|
||||||
hijack_netrw_behavior = "open_current",
|
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
Reference in New Issue
Block a user