feat(neo-tree): load neo-tree when specifying a direcory on the cmdline

This commit is contained in:
Folke Lemaitre
2023-01-10 23:44:02 +01:00
parent 701337fac8
commit 81d798fdaa

View File

@ -20,11 +20,16 @@ return {
},
init = function()
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,
opts = {
filesystem = {
follow_current_file = true,
hijack_netrw_behavior = "open_current",
},
},
},